split modules and fix Ev

This commit is contained in:
Swrup 2022-04-07 14:45:11 +02:00
parent 2154a10db4
commit 82d74ad985
18 changed files with 208 additions and 225 deletions

14
src/latlng.ml Normal file
View file

@ -0,0 +1,14 @@
type t = Jv.t
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
let lng latlng = Jv.get latlng "lng" |> Jv.to_float
let equals a b = Jv.call a "equals" [| b |] |> Jv.to_bool
let of_jv_t = Fun.id
let to_jv_t = Fun.id