add cirecle marker
This commit is contained in:
parent
59e22333e7
commit
3b12978c1a
2 changed files with 13 additions and 0 deletions
|
|
@ -228,8 +228,17 @@ let create_tile_osm : tile_layer_opt array -> [ `Tile ] t =
|
|||
|
||||
(* Vector Layers *)
|
||||
|
||||
(* TODO add options *)
|
||||
|
||||
let create_polyline : Latlng.t array -> [ `Vector ] t =
|
||||
fun l ->
|
||||
let l = Jv.of_array Latlng.to_jv l in
|
||||
let jv_t = Jv.call Global.leaflet "polyline" [| l |] in
|
||||
Vector jv_t
|
||||
|
||||
let create_circle_marker : Latlng.t -> float -> [ `Vector ] t =
|
||||
fun center radius ->
|
||||
let center = Latlng.to_jv center in
|
||||
let arr = [| ("radius", Jv.of_float radius) |] in
|
||||
let jv_t = Jv.call Global.leaflet "circleMarker" [| center; Jv.obj arr |] in
|
||||
Vector jv_t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue