package leaflet

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type _ t =
  1. | Basic : Jv.t -> [> `Basic ] t
  2. | Geojson : Jv.t -> [> `Geojson ] t
  3. | Marker : Jv.t -> [> `Marker ] t
  4. | Tile : Jv.t -> [> `Tile ] t

Basic layers

val add_to : Map.t -> _ t -> unit

add_to map layer adds layer to map

val remove : _ t -> unit

remove layer removes layer from the map it is currently active on

val remove_from : Map.t -> _ t -> unit

remove_from map layer removes layer from map

val bind_popup : Brr.El.t -> _ t -> unit

bind_popup popup layer binds popup to layer

val unbind_popup : _ t -> unit

unbind_popup layer unbinds the popup bound to layer

val open_popup : _ t -> unit

open_popup layer opens the popup bound to layer

val close_popup : _ t -> unit

close_popup layer closes the popup bound to layer

val get_popup : _ t -> Popup.t

get_popup layer is the popup bound to layer

val to_jv : _ t -> Jv.t

to_jv o is o as a Jv.t

Geojson layers

val create_geojson : ?options:Jv.t -> Jv.t -> [ `Geojson ] t

create_geojson geojson is a new geojson layer

Marker layers

val create_marker : Latlng.t -> [ `Marker ] t

create_marker latlng is a new marker with the same position as latlng

Tile layers

val create_tile_osm : string option -> [ `Tile ] t

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