Layer

abstract external class Layer<T : Layer.LayerOptions>(options: T = definedExternally) : Evented

A set of methods from the Layer base class that all Leaflet layers use. Inherits all methods, options and events from Evented.

Inheritors

Constructors

Link copied to clipboard
constructor(options: T = definedExternally)

Types

Link copied to clipboard

Some Layers can be made interactive - when the user interacts with such a layer, mouse events like click and mouseover can be handled. Use the event handling methods to handle these events.

Link copied to clipboard
interface LayerOptions

Properties

Link copied to clipboard
open var options: T

Functions

Link copied to clipboard
open fun addEventListener(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletErrorEventId, fn: ErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletLayerEventId, fn: LayerEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletControlEventId, fn: LayersControlEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletEventId, fn: LeafletEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletLocationEventId, fn: LocationEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletPopupEventId, fn: PopupEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletResizeEventId, fn: ResizeEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletTileErrorId, fn: TileErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletTileEventId, fn: TileEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn, context: Any = definedExternally): Evented
open fun addEventListener(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn, context: Any = definedExternally): Evented
Link copied to clipboard
Link copied to clipboard
open fun addOneTimeEventListener(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletErrorEventId, fn: ErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletLayerEventId, fn: LayerEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletControlEventId, fn: LayersControlEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletEventId, fn: LeafletEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletLocationEventId, fn: LocationEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletPopupEventId, fn: PopupEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletResizeEventId, fn: ResizeEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletTileErrorId, fn: TileErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletTileEventId, fn: TileEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn, context: Any = definedExternally): Evented
open fun addOneTimeEventListener(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn, context: Any = definedExternally): Evented
Link copied to clipboard
open fun addTo(map: LayerGroup): Layer<T>
open fun addTo(map: LeafletMap): Layer<T>
Link copied to clipboard
open fun beforeAdd(map: LeafletMap): Layer<T>?
Link copied to clipboard
open fun bindPopup(content: <Error class: unknown class>, options: Popup.PopupOptions = definedExternally): Layer<T>
open fun bindPopup(content: Popup, options: Popup.PopupOptions = definedExternally): Layer<T>
open fun bindPopup(content: (layer: Layer<T>) -> Any, options: Popup.PopupOptions = definedExternally): Layer<T>
open fun bindPopup(content: String, options: Popup.PopupOptions = definedExternally): Layer<T>
Link copied to clipboard
open fun bindTooltip(content: <Error class: unknown class>, options: Tooltip.TooltipOptions = definedExternally): Layer<T>
open fun bindTooltip(content: Tooltip, options: Tooltip.TooltipOptions = definedExternally): Layer<T>
open fun bindTooltip(content: (layer: Layer<T>) -> Any, options: Tooltip.TooltipOptions = definedExternally): Layer<T>
open fun bindTooltip(content: String, options: Tooltip.TooltipOptions = definedExternally): Layer<T>
Link copied to clipboard
Link copied to clipboard
open fun closePopup(): Layer<T>
Link copied to clipboard
open fun closeTooltip(): Layer<T>
Link copied to clipboard
open fun fire(type: String, data: Any = definedExternally, propagate: Boolean = definedExternally): Evented
Link copied to clipboard
open fun fireEvent(type: String, data: Any = definedExternally, propagate: Boolean = definedExternally): Evented
Link copied to clipboard
open fun getAttribution(): String?
Link copied to clipboard
Link copied to clipboard
open fun getPane(name: String = definedExternally): <Error class: unknown class>?
Link copied to clipboard
open fun getPopup(): Popup?
Link copied to clipboard
open fun getTooltip(): Tooltip?
Link copied to clipboard
Link copied to clipboard
open fun isPopupOpen(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun listens(type: String): Boolean
Link copied to clipboard
open fun off(): Evented
open fun off(eventMap: LeafletEventHandlerFnMap): Evented
open fun off(type: LeafletAnyEventId): Evented
open fun off(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletErrorEventId, fn: ErrorEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletLayerEventId, fn: LayerEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletControlEventId, fn: LayersControlEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletEventId, fn: LeafletEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletLocationEventId, fn: LocationEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletPopupEventId, fn: PopupEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletResizeEventId, fn: ResizeEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletTileErrorId, fn: TileErrorEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletTileEventId, fn: TileEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun off(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
Link copied to clipboard
open fun on(eventMap: LeafletEventHandlerFnMap): Evented
open fun on(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletErrorEventId, fn: ErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletLayerEventId, fn: LayerEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletControlEventId, fn: LayersControlEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletEventId, fn: LeafletEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletLocationEventId, fn: LocationEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletPopupEventId, fn: PopupEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletResizeEventId, fn: ResizeEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletTileErrorId, fn: TileErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletTileEventId, fn: TileEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn, context: Any = definedExternally): Evented
open fun on(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn, context: Any = definedExternally): Evented
Link copied to clipboard
open fun onAdd(map: LeafletMap): Layer<T>
Link copied to clipboard
open fun once(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletErrorEventId, fn: ErrorEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletLayerEventId, fn: LayerEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletControlEventId, fn: LayersControlEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletEventId, fn: LeafletEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletLocationEventId, fn: LocationEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletPopupEventId, fn: PopupEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletResizeEventId, fn: ResizeEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletTileEventId, fn: TileEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn, context: Any = definedExternally): Evented
open fun once(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn, context: Any = definedExternally): Evented
Link copied to clipboard
open fun onRemove(map: LeafletMap): Layer<T>
Link copied to clipboard
open fun openPopup(): Layer<T>
open fun openPopup(latlng: LatLng = definedExternally): Layer<T>
Link copied to clipboard
open fun openTooltip(): Layer<T>
open fun openTooltip(latlng: LatLng = definedExternally): Layer<T>
Link copied to clipboard
open fun remove(): Layer<T>
Link copied to clipboard
open fun removeEventListener(type: LeafletDragEndEventId, fn: DragEndEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletErrorEventId, fn: ErrorEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletLayerEventId, fn: LayerEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletControlEventId, fn: LayersControlEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletEventId, fn: LeafletEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletKeyboardEventId, fn: LeafletKeyboardEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletMouseEventId, fn: LeafletMouseEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletLocationEventId, fn: LocationEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletPopupEventId, fn: PopupEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletResizeEventId, fn: ResizeEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletTileErrorId, fn: TileErrorEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletTileEventId, fn: TileEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletTooltipEventId, fn: TooltipEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
open fun removeEventListener(type: LeafletZoomAnimEventId, fn: ZoomAnimEventHandlerFn = definedExternally, context: Any = definedExternally): Evented
Link copied to clipboard
Link copied to clipboard
open fun removeFrom(map: LeafletMap): Layer<T>
Link copied to clipboard
open fun setPopupContent(content: <Error class: unknown class>): Layer<T>
open fun setPopupContent(content: Popup): Layer<T>
open fun setPopupContent(content: String): Layer<T>
Link copied to clipboard
open fun setTooltipContent(content: <Error class: unknown class>): Layer<T>
open fun setTooltipContent(content: Tooltip): Layer<T>
open fun setTooltipContent(content: String): Layer<T>
Link copied to clipboard
open fun togglePopup(): Layer<T>
Link copied to clipboard
open fun toggleTooltip(): Layer<T>
Link copied to clipboard
open fun unbindPopup(): Layer<T>
Link copied to clipboard
open fun unbindTooltip(): Layer<T>