-> Latlng.create ~lat ~lng
This commit is contained in:
parent
82fa7afc21
commit
2177dec31e
4 changed files with 4 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
version=0.24.1
|
||||
version=0.26.1
|
||||
assignment-operator=end-line
|
||||
break-cases=fit
|
||||
break-fun-decl=wrap
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ let () =
|
|||
Leaflet.Layer.add_to map osm_layer;
|
||||
|
||||
(* set view *)
|
||||
let latlng = Leaflet.Latlng.create 40.71 (-74.0) in
|
||||
let latlng = Leaflet.Latlng.create ~lat:40.71 ~lng:(-74.0) in
|
||||
ignore @@ Leaflet.Map.set_view latlng ~zoom:(Some 13) map
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
type t = Jv.t
|
||||
|
||||
let create lat lng =
|
||||
let create ~lat ~lng =
|
||||
Jv.call Global.leaflet "latLng" [| Jv.of_float lat; Jv.of_float lng |]
|
||||
|
||||
let lat latlng = Jv.get latlng "lat" |> Jv.to_float
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ type t
|
|||
|
||||
(** [create lat lng] is an object representing a geographical point with the
|
||||
given latitude and longitude *)
|
||||
val create : float -> float -> t
|
||||
val create : lat:float -> lng:float -> t
|
||||
|
||||
(** [lat o] is the latitude of [o] *)
|
||||
val lat : t -> float
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue