leaflet/src/marker.mli

39 lines
1 KiB
OCaml
Raw Normal View History

2024-01-29 22:07:41 +01:00
type t = [ `Marker ] Layer.t
(** type for marker option, used to create marker *)
type marker_opt =
| Icon of Icon.t
| Keyboard of bool
| Title of string
| Alt of string
| Z_index_offset of int
| Opacity of float
| Rise_on_hover of bool
| Rise_offset of int
| Pane of string
| Shadow_pane of string
| Bubbling_mouse_events of bool
| Auto_pan_on_focus of bool
(** [create_marker latlng options] is a new marker with the same position as
[latlng] and with options set to [options] *)
val create_marker : Latlng.t -> marker_opt list -> t
(** Returns the current geographical position of the marker. *)
val get_latlng : t -> Latlng.t
(** Changes the marker position to the given point. *)
val set_latlng : Latlng.t -> t -> unit
(** Changes the zIndex offset of the marker. *)
val set_z_index_offset : int -> t -> unit
(** Returns the current icon used by the marker *)
val get_icon : t -> Icon.t
(** Changes the marker icon. *)
val set_icon : Icon.t -> t -> unit
(** Changes the opacity of the marker. *)
val set_opacity : int -> t -> unit