better popup
This commit is contained in:
parent
e7cb530186
commit
827023a056
1 changed files with 5 additions and 3 deletions
|
|
@ -7,8 +7,9 @@ module Leaflet = struct
|
||||||
| Some l -> l
|
| Some l -> l
|
||||||
| None -> failwith "can't load leaflet"
|
| None -> failwith "can't load leaflet"
|
||||||
|
|
||||||
(* get popup object *)
|
(* get popup object, with no close button*)
|
||||||
let popup = Jv.call leaflet "popup" [||]
|
let popup =
|
||||||
|
Jv.call leaflet "popup" [| Jv.obj [| ("closeButton", Jv.false') |] |]
|
||||||
|
|
||||||
(* create a map *)
|
(* create a map *)
|
||||||
let map =
|
let map =
|
||||||
|
|
@ -81,7 +82,8 @@ let on_click e =
|
||||||
|
|
||||||
let lat_lng = Jv.get e "latlng" in
|
let lat_lng = Jv.get e "latlng" in
|
||||||
ignore @@ Jv.call Leaflet.popup "setLatLng" [| lat_lng |];
|
ignore @@ Jv.call Leaflet.popup "setLatLng" [| lat_lng |];
|
||||||
ignore @@ Jv.call Leaflet.popup "setContent" [| Jv.of_string "euujjj" |];
|
ignore
|
||||||
|
@@ Jv.call Leaflet.popup "setContent" [| Jv.of_string "create thread here" |];
|
||||||
ignore @@ Jv.call Leaflet.popup "openOn" [| Leaflet.map |];
|
ignore @@ Jv.call Leaflet.popup "openOn" [| Leaflet.map |];
|
||||||
|
|
||||||
let lat = Jv.get lat_lng "lat" in
|
let lat = Jv.get lat_lng "lat" in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue