-> Latlng.create ~lat ~lng

This commit is contained in:
Swrup 2024-01-29 20:27:37 +01:00
parent 4413b178a1
commit 82f0015761
4 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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