add documentation, remove Map.as_target

This commit is contained in:
Swrup 2022-05-19 22:42:28 +02:00
parent d242b1ac6e
commit 21bf82239b
7 changed files with 50 additions and 19 deletions

View file

@ -8,32 +8,46 @@ type _ t =
(** Basic layers *)
(** [add_to map layer] adds [layer] to [map] *)
val add_to : Map.t -> _ t -> unit
(** [remove layer] removes [layer] from the map it is currently active on *)
val remove : _ t -> unit
(** [remove_from map layer] removes [layer] from [map] *)
val remove_from : Map.t -> _ t -> unit
(** [bind_popup popup layer] binds [popup] to [layer] *)
val bind_popup : Brr.El.t -> _ t -> unit
(** [unbind_popup layer] unbinds the popup bound to [layer] *)
val unbind_popup : _ t -> unit
(** [open_popup layer] opens the popup bound to [layer] *)
val open_popup : _ t -> unit
(** [close_popup layer] closes the popup bound to [layer] *)
val close_popup : _ t -> unit
(** [get_popup layer] is the popup bound to [layer] *)
val get_popup : _ t -> Popup.t
(** [to_jv o] is [o] as a {!Jv.t} *)
val to_jv : _ t -> Jv.t
(** Geojson layers *)
(** [create_geojson geojson] is a new geojson layer *)
val create_geojson : ?options:Jv.t -> Jv.t -> [ `Geojson ] t
(** Marker layers *)
(** [create_marker latlng] is a new marker with the same position as latlng *)
val create_marker : Latlng.t -> [ `Marker ] t
(** Tile layers *)
(** [create_tile_osm Some(url)] is a new tile layer with tile server specified
by [url]. Tile server default to [openstreetmap.org]. See
{:https://wiki.openstreetmap.org/wiki/Tile_servers} *)
val create_tile_osm : string option -> [ `Tile ] t