use dune-site

This commit is contained in:
Swrup 2024-02-08 15:58:52 +01:00
parent 8ade976f6c
commit ca369c219e
14 changed files with 126 additions and 53 deletions

16
example/script.ml Normal file
View file

@ -0,0 +1,16 @@
(* this file will be compiled to js
you can then open map.html to see a simple page with a map loaded
by this script *)
(* create map *)
let map = Leaflet.Map.create_on "map"
(* setup map *)
let () =
(* set osm layer *)
let osm_layer = Leaflet.Layer.create_tile_osm [||] in
Leaflet.Layer.add_to map osm_layer;
(* set view *)
let latlng = Leaflet.Latlng.create ~lat:40.71 ~lng:(-74.0) in
ignore @@ Leaflet.Map.set_view latlng ~zoom:(Some 13) map