(* create map *) let map = 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 () = (* set osm layer *) let osm_layer = Leaflet.Layer.create_tile_osm None in Leaflet.Layer.add_to map osm_layer; (* set view *) let latlng = Leaflet.Latlng.create 40.71 (-74.0) in ignore @@ Leaflet.Map.set_view latlng ~zoom:(Some 13) map