make Map.create take Brr.El

This commit is contained in:
Swrup 2022-05-19 16:16:37 +02:00
parent 2a126d0822
commit f26ea6f5bb
4 changed files with 12 additions and 6 deletions

View file

@ -1,7 +1,11 @@
(* create map *)
let map =
let container_id = "map" in
Leaflet.Map.create container_id
let container =
match Brr.Document.find_el_by_id Brr.G.document (Jstr.of_string "map") with
| None -> failwith "map container not found"
| Some el -> el
in
Leaflet.Map.create container
(* setup map *)
let () =