leaflet/src/popup.ml

16 lines
414 B
OCaml
Raw Normal View History

2022-04-08 13:21:20 +02:00
type t = Jv.t
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" [||]
2022-04-08 13:21:20 +02:00
let of_jv_t = Fun.id