add Icon.set_default_image_path
This commit is contained in:
parent
a8266ae615
commit
b2c78c1e5d
2 changed files with 8 additions and 0 deletions
|
|
@ -67,3 +67,8 @@ let create_div ~html ~bg_pos options =
|
|||
in
|
||||
let l = Array.of_list @@ div_options @ l in
|
||||
Jv.call Global.leaflet "divIcon" [| Jv.obj l |]
|
||||
|
||||
let set_default_image_path s =
|
||||
let icon = Jv.get Global.leaflet "Icon" in
|
||||
let icon_default = Jv.get icon "Default" in
|
||||
Jv.set icon_default "imagePath" (Jv.of_string s)
|
||||
|
|
|
|||
|
|
@ -31,3 +31,6 @@ val create : string -> opt list -> t
|
|||
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
|
||||
|
||||
(** Sets the path of the default icon *)
|
||||
val set_default_image_path : string -> unit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue