list -> array
This commit is contained in:
parent
3d19bc3f40
commit
16e5fe0b2e
9 changed files with 30 additions and 39 deletions
|
|
@ -69,9 +69,7 @@ let opt_to_jv = function
|
|||
| Pane s | Class_name s -> Jv.of_string s
|
||||
|
||||
let create ~content ~latlng options =
|
||||
let l =
|
||||
Array.of_list @@ List.map (fun o -> (opt_to_string o, opt_to_jv o)) options
|
||||
in
|
||||
let l = Array.map (fun o -> (opt_to_string o, opt_to_jv o)) options in
|
||||
let popup = Jv.call Global.leaflet "popup" [| Jv.obj l |] in
|
||||
let popup =
|
||||
match latlng with
|
||||
|
|
@ -87,9 +85,7 @@ let create ~content ~latlng options =
|
|||
popup
|
||||
|
||||
let create_from_el el ~latlng options =
|
||||
let l =
|
||||
Array.of_list @@ List.map (fun o -> (opt_to_string o, opt_to_jv o)) options
|
||||
in
|
||||
let l = Array.map (fun o -> (opt_to_string o, opt_to_jv o)) options in
|
||||
let popup = Jv.call Global.leaflet "popup" [| Jv.obj l |] in
|
||||
let popup =
|
||||
match latlng with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue