split modules and fix Ev

This commit is contained in:
Swrup 2022-04-07 14:45:11 +02:00
parent 7973527757
commit 982a1f295b
18 changed files with 208 additions and 225 deletions

11
src/popup.ml Normal file
View file

@ -0,0 +1,11 @@
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" [||]