add of_jv, on, ?options for bind_popup
This commit is contained in:
parent
95f13b320b
commit
d1acabfdcd
2 changed files with 40 additions and 4 deletions
|
|
@ -6,6 +6,12 @@ type _ t =
|
|||
| Marker : Jv.t -> [> `Marker ] t
|
||||
| Tile : Jv.t -> [> `Tile ] t
|
||||
|
||||
type _ sub =
|
||||
| Basic : [> `Basic ] sub
|
||||
| Geojson : [> `Geojson ] sub
|
||||
| Marker : [> `Marker ] sub
|
||||
| Tile : [> `Tile ] sub
|
||||
|
||||
(** Basic layers *)
|
||||
|
||||
(** [add_to map layer] adds [layer] to [map] *)
|
||||
|
|
@ -18,7 +24,7 @@ val remove : _ t -> unit
|
|||
val remove_from : Map.t -> _ t -> unit
|
||||
|
||||
(** [bind_popup popup layer] binds [popup] to [layer] *)
|
||||
val bind_popup : Brr.El.t -> _ t -> unit
|
||||
val bind_popup : Brr.El.t -> ?options:Jv.t -> _ t -> unit
|
||||
|
||||
(** [unbind_popup layer] unbinds the popup bound to [layer] *)
|
||||
val unbind_popup : _ t -> unit
|
||||
|
|
@ -35,6 +41,13 @@ val get_popup : _ t -> Popup.t
|
|||
(** [to_jv o] is [o] as a {!Jv.t} *)
|
||||
val to_jv : _ t -> Jv.t
|
||||
|
||||
(** [of_jv tag o] is [o] as a [tag t] *)
|
||||
val of_jv : 'a sub -> Jv.t -> 'a t
|
||||
|
||||
(** [on event handler layer] add an event listener on [layer] for event [event]
|
||||
with handler [handler] *)
|
||||
val on : 'a Event.sub -> ('a Event.t -> 'b) -> 'c t -> unit
|
||||
|
||||
(** Geojson layers *)
|
||||
|
||||
(** [create_geojson geojson] is a new geojson layer *)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue