leaflet/src/icon.mli

34 lines
1 KiB
OCaml
Raw Normal View History

2022-06-20 07:57:38 +02:00
(* BSD-2-Clause License *)
type t
2022-06-20 08:16:21 +02:00
(** [to_jv o] is [o] as {!Jv.t} *)
val to_jv : t -> Jv.t
2022-11-24 19:21:57 +01:00
(** [of_jv o] is [o] as {!Icon.t} *)
val of_jv : Jv.t -> t
2022-06-20 10:05:35 +02:00
(** type for icon option used to create an icon*)
2022-06-20 07:57:38 +02:00
type opt =
| Icon_retina_url of string
| Icon_size of Point.t
| Icon_anchor of Point.t
| Popup_anchor of Point.t
| Tooltip_anchor of Point.t
| Shadow_url of string
| Shadow_retina_url of string
| Shadow_size of Point.t
| Shadow_anchor of Point.t
| Class_name of string
| Cross_origin of string option
(** [create icon_url options] Creates an icon instance with the given [options],
and the required `iconUrl` option set to [icon_url] *)
val create : string -> opt list -> t
2022-11-24 19:21:57 +01:00
(** [create_div ~html ~bg_pos options] Creates an DivIcon instance with the
given [options], [bg_pos] is the optional relative position of the
background, in pixels [html] is custom HTML code to put inside the div
element, empty by default. *)
val create_div : html:string option -> bg_pos:Point.t option -> opt list -> t