add example

This commit is contained in:
Swrup 2022-05-19 15:46:43 +02:00
parent f0435c549b
commit 0370fb97a2
4 changed files with 671 additions and 2 deletions

View file

@ -1 +1,14 @@
let () = Format.printf "TODO@."
(* create map *)
let map =
let container_id = "map" in
Leaflet.Map.create container_id
(* 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