use gadts for layer, clean code

This commit is contained in:
pena 2022-04-09 22:21:22 +02:00
parent 2a760bc98d
commit dbfbaeda60
17 changed files with 152 additions and 163 deletions

View file

@ -3,13 +3,19 @@ type t = Jv.t
let popup = Jv.call Global.leaflet "popup" [||]
let set_latlng latlng =
ignore @@ Jv.call popup "setLatLng" [| Latlng.to_jv_t latlng |]
let (_ : Jv.t) = Jv.call popup "setLatLng" [| Latlng.to_jv latlng |] in
()
let set_content content =
ignore @@ Jv.call popup "setContent" [| Jv.of_string content |]
let (_ : Jv.t) = Jv.call popup "setContent" [| Jv.of_string content |] in
()
let open_on map = ignore @@ Jv.call popup "openOn" [| Map.to_jv_t map |]
let open_on map =
let (_ : Jv.t) = Jv.call popup "openOn" [| Map.to_jv map |] in
()
let close map = ignore @@ Jv.call (Map.to_jv_t map) "closePopup" [||]
let close map =
let (_ : Jv.t) = Jv.call (Map.to_jv map) "closePopup" [||] in
()
let of_jv_t = Fun.id
let of_jv = Fun.id