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

34
src/map.mli Normal file
View file

@ -0,0 +1,34 @@
type t
module Event : sig
(* TODO do this need to be wrapped in Brr.Ev.type' ?*)
val click : Ev.Mouse.t Brr.Ev.type'
val moveend : Ev.Event.t Brr.Ev.type'
val zoomend : Ev.Event.t Brr.Ev.type'
end
val create : ?options:Jv.t -> string -> t
val invalidate_size : t -> unit
val set_view : Latlng.t -> ?zoom:int -> t -> unit
val fit_world : t -> unit
val get_container : t -> Brr.El.t
val on : event:'a Brr.Ev.type' -> handler:('a -> 'b) -> t -> unit
val get_center : t -> Latlng.t
val get_zoom : t -> int
val wrapped_latlng : Latlng.t -> t -> Latlng.t
val as_target : t -> Brr.Ev.target
val of_jv_t : Jv.t -> t
val to_jv_t : t -> Jv.t