make Map.create take Brr.El
This commit is contained in:
parent
2965572a4b
commit
d242b1ac6e
4 changed files with 12 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
(executable
|
||||
(name main)
|
||||
(modules main)
|
||||
(libraries leaflet)
|
||||
(libraries brr leaflet)
|
||||
(modes js)
|
||||
(preprocess
|
||||
(pps js_of_ocaml-ppx)))
|
||||
|
|
|
|||
|
|
@ -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 () =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue