better Layer.bind_popup and add Map.open/close_popup

This commit is contained in:
Swrup 2022-06-26 04:08:53 +02:00
parent 2affa8b5fa
commit 23ea827e40
6 changed files with 21 additions and 24 deletions

View file

@ -46,3 +46,9 @@ let get_zoom map = Jv.call map "getZoom" [||] |> Jv.to_int
let wrap_latlng latlng map =
Latlng.of_jv @@ Jv.call map "wrapLatLng" [| Latlng.to_jv latlng |]
let open_popup popup map =
ignore @@ Jv.call map "openPopup" [| Popup.to_jv popup |]
let close_popup popup map =
ignore @@ Jv.call map "closePopup" [| Popup.to_jv popup |]