add Icon.set_default_image_path

This commit is contained in:
Swrup 2024-01-29 22:08:10 +01:00
parent a8266ae615
commit b2c78c1e5d
2 changed files with 8 additions and 0 deletions

View file

@ -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)