leaflet/src/marker.mli
2024-01-30 16:55:19 +01:00

39 lines
1.0 KiB
OCaml

type t = [ `Marker ] Layer.t
(** type for marker option, used to create marker *)
type 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 latlng options] is a new marker with the same position as [latlng]
and with options set to [options] *)
val create : Latlng.t -> opt array -> 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