add layer

This commit is contained in:
Swrup 2022-04-08 13:21:20 +02:00
parent d99eafccbf
commit d9f25e4d8d
11 changed files with 123 additions and 35 deletions

View file

@ -1,11 +1,4 @@
type t = Jv.t
include Layer
let create latlng = Jv.call Global.leaflet "marker" [| Latlng.to_jv_t latlng |]
let add_to marker map = ignore @@ Jv.call marker "addTo" [| Map.to_jv_t map |]
let bind_popup el marker =
ignore @@ Jv.call marker "bindPopup" [| Brr.El.to_jv el |];
marker
let open_popup marker = ignore @@ Jv.call marker "openPopup" [||]
let create latlng =
of_jv_t @@ Jv.call Global.leaflet "marker" [| Latlng.to_jv_t latlng |]