leaflet/src/popup.ml

12 lines
377 B
OCaml
Raw Normal View History

2022-04-07 14:45:11 +02:00
let popup = Jv.call Global.leaflet "popup" [||]
let set_latlng latlng =
ignore @@ Jv.call popup "setLatLng" [| Latlng.to_jv_t latlng |]
let set_content content =
ignore @@ Jv.call popup "setContent" [| Jv.of_string content |]
let open_on map = ignore @@ Jv.call popup "openOn" [| Map.to_jv_t map |]
let close map = ignore @@ Jv.call (Map.to_jv_t map) "closePopup" [||]