use dune-site
This commit is contained in:
parent
2b8f3e8e7c
commit
037c094ed5
14 changed files with 126 additions and 53 deletions
16
example/script.ml
Normal file
16
example/script.ml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue