use gadts for layer, clean code
This commit is contained in:
parent
9e66f26b71
commit
9db5cdfd22
17 changed files with 152 additions and 163 deletions
16
src/popup.ml
16
src/popup.ml
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue