use gadts for layer, clean code
This commit is contained in:
parent
f4ab3e17ad
commit
fbfb403734
17 changed files with 152 additions and 163 deletions
|
|
@ -1,21 +1,37 @@
|
|||
type t
|
||||
type _ t =
|
||||
| Basic : Jv.t -> [> `Basic ] t
|
||||
| Geojson : Jv.t -> [> `Geojson ] t
|
||||
| Marker : Jv.t -> [> `Marker ] t
|
||||
| Tile : Jv.t -> [> `Tile ] t
|
||||
|
||||
val add_to : Map.t -> t -> unit
|
||||
(** Basic layers *)
|
||||
|
||||
val remove : t -> unit
|
||||
val add_to : Map.t -> _ t -> unit
|
||||
|
||||
val remove_from : Map.t -> t -> unit
|
||||
val remove : _ t -> unit
|
||||
|
||||
val bind_popup : Brr.El.t -> t -> unit
|
||||
val remove_from : Map.t -> _ t -> unit
|
||||
|
||||
val unbind_popup : t -> unit
|
||||
val bind_popup : Brr.El.t -> _ t -> unit
|
||||
|
||||
val open_popup : t -> unit
|
||||
val unbind_popup : _ t -> unit
|
||||
|
||||
val close_popup : t -> unit
|
||||
val open_popup : _ t -> unit
|
||||
|
||||
val get_popup : t -> Popup.t
|
||||
val close_popup : _ t -> unit
|
||||
|
||||
val of_jv_t : Jv.t -> t
|
||||
val get_popup : _ t -> Popup.t
|
||||
|
||||
val to_jv_t : t -> Jv.t
|
||||
val to_jv : _ t -> Jv.t
|
||||
|
||||
(** Geojson layers *)
|
||||
|
||||
val create_geojson : ?options:Jv.t -> Jv.t -> [ `Geojson ] t
|
||||
|
||||
(** Marker layers *)
|
||||
|
||||
val create_marker : Latlng.t -> [ `Marker ] t
|
||||
|
||||
(** Tile layers *)
|
||||
|
||||
val create_tile_osm : string option -> [ `Tile ] t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue