Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Timeline<P>

Type parameters

  • P

Hierarchy

  • GeoJSON
    • Timeline

Index

Constructors

constructor

  • new Timeline(geojson?: geojson.GeoJsonObject, options?: GeoJSONOptions<P>): Timeline
  • Parameters

    • Optional geojson: geojson.GeoJsonObject
    • Optional options: GeoJSONOptions<P>

    Returns Timeline

Properties

Protected _map

_map: Map

end

end: number

Optional feature

feature: FeatureCollection<geojson.GeometryObject, P> | Feature<MultiPoint, P> | GeometryCollection

options

options: Required<TimelineOptions>

ranges

ranges: IntervalTree<Feature>

start

start: number

time

time: number

times

times: number[]

Methods

addData

  • addData(data: GeoJsonObject): Layer
  • Adds a GeoJSON object to the layer.

    Parameters

    • data: GeoJsonObject

    Returns Layer

addEventListener

  • addEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • addEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): this
  • addEventListener(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): this
  • addEventListener(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn: LeafletEventHandlerFn, context?: any): this
  • addEventListener(type: "resize", fn: ResizeEventHandlerFn, context?: any): this
  • addEventListener(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): this
  • addEventListener(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): this
  • addEventListener(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): this
  • addEventListener(type: "locationfound", fn: LocationEventHandlerFn, context?: any): this
  • addEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): this
  • addEventListener(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): this
  • addEventListener(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): this
  • addEventListener(type: "dragend", fn: DragEndEventHandlerFn, context?: any): this
  • addEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): this
  • addEventListener(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): this
  • addEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for on(...)

    Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • fn: TileErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for on(...)

    Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

addEventParent

  • addEventParent(obj: Evented): this
  • Adds an event parent - an Evented that will receive propagated events

    Parameters

    • obj: Evented

    Returns this

addLayer

  • addLayer(layer: Layer): this
  • Adds the given layer to the group.

    Parameters

    • layer: Layer

    Returns this

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn: LeafletEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "resize", fn: ResizeEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "locationfound", fn: LocationEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "dragend", fn: DragEndEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): this
  • addOneTimeEventListener(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): this
  • addOneTimeEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • fn: TileErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

addTo

  • addTo(map: Map | LayerGroup): this
  • Parameters

    • map: Map | LayerGroup

    Returns this

Optional beforeAdd

  • beforeAdd(map: Map): this
  • Parameters

    • map: Map

    Returns this

bindPopup

  • bindPopup(content: ((layer: Layer) => Content) | Content | Popup, options?: PopupOptions): this
  • Parameters

    • content: ((layer: Layer) => Content) | Content | Popup
    • Optional options: PopupOptions

    Returns this

bindTooltip

  • bindTooltip(content: ((layer: Layer) => Content) | Tooltip | Content, options?: TooltipOptions): this
  • Parameters

    • content: ((layer: Layer) => Content) | Tooltip | Content
    • Optional options: TooltipOptions

    Returns this

bringToBack

  • bringToBack(): this
  • Brings the layer group to the top [sic] of all other layers

    Returns this

bringToFront

  • bringToFront(): this
  • Brings the layer group to the top of all other layers

    Returns this

clearAllEventListeners

  • clearAllEventListeners(): this
  • Alias for off()

    Removes all listeners to all events on the object.

    Returns this

clearLayers

  • clearLayers(): this
  • Removes all the layers from the group.

    Returns this

closePopup

  • closePopup(): this
  • Returns this

closeTooltip

  • closeTooltip(): this
  • Returns this

eachLayer

  • eachLayer(fn: (layer: Layer) => void, context?: any): this
  • Iterates over the layers of the group, optionally specifying context of the iterator function.

    Parameters

    • fn: (layer: Layer) => void
        • (layer: Layer): void
        • Parameters

          • layer: Layer

          Returns void

    • Optional context: any

    Returns this

fire

  • fire(type: string, data?: any, propagate?: undefined | false | true): this
  • Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: any
    • Optional propagate: undefined | false | true

    Returns this

fireEvent

  • fireEvent(type: string, data?: any, propagate?: undefined | false | true): this
  • Alias for fire(...)

    Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: any
    • Optional propagate: undefined | false | true

    Returns this

Optional getAttribution

  • getAttribution(): string | null
  • Returns string | null

getBounds

  • getBounds(): LatLngBounds
  • Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).

    Returns LatLngBounds

Optional getEvents

  • getEvents(): {}
  • Returns {}

    • [name: string]: LeafletEventHandlerFn

getLayer

  • getLayer(id: number): Layer | undefined
  • Returns the layer with the given internal ID.

    Parameters

    • id: number

    Returns Layer | undefined

getLayerId

  • getLayerId(layer: Layer): number
  • Returns the internal ID for a layer

    Parameters

    • layer: Layer

    Returns number

getLayers

  • getLayers(): GeoJSON[]

getPane

  • getPane(name?: undefined | string): HTMLElement | undefined
  • Parameters

    • Optional name: undefined | string

    Returns HTMLElement | undefined

getPopup

  • getPopup(): Popup | undefined
  • Returns Popup | undefined

getTooltip

  • getTooltip(): Tooltip | undefined
  • Returns Tooltip | undefined

hasEventListeners

  • hasEventListeners(type: string): boolean
  • Alias for listens(...)

    Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

hasLayer

  • hasLayer(layer: Layer): boolean
  • Returns true if the given layer is currently added to the group.

    Parameters

    • layer: Layer

    Returns boolean

invoke

  • invoke(methodName: string, ...params: any[]): this
  • Calls methodName on every layer contained in this group, passing any additional parameters. Has no effect if the layers contained do not implement methodName.

    Parameters

    • methodName: string
    • Rest ...params: any[]

    Returns this

isPopupOpen

  • isPopupOpen(): boolean
  • Returns boolean

isTooltipOpen

  • isTooltipOpen(): boolean
  • Returns boolean

listens

  • listens(type: string): boolean
  • Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

off

  • off(type: string, fn?: LeafletEventHandlerFn, context?: any): this
  • off(type: "baselayerchange" | "overlayadd" | "overlayremove", fn?: LayersControlEventHandlerFn, context?: any): this
  • off(type: "layeradd" | "layerremove", fn?: LayerEventHandlerFn, context?: any): this
  • off(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn?: LeafletEventHandlerFn, context?: any): this
  • off(type: "resize", fn?: ResizeEventHandlerFn, context?: any): this
  • off(type: "popupopen" | "popupclose", fn?: PopupEventHandlerFn, context?: any): this
  • off(type: "tooltipopen" | "tooltipclose", fn?: TooltipEventHandlerFn, context?: any): this
  • off(type: "locationerror", fn?: ErrorEventHandlerFn, context?: any): this
  • off(type: "locationfound", fn?: LocationEventHandlerFn, context?: any): this
  • off(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn?: LeafletMouseEventHandlerFn, context?: any): this
  • off(type: "keypress" | "keydown" | "keyup", fn?: LeafletKeyboardEventHandlerFn, context?: any): this
  • off(type: "zoomanim", fn?: ZoomAnimEventHandlerFn, context?: any): this
  • off(type: "dragend", fn?: DragEndEventHandlerFn, context?: any): this
  • off(type: "tileunload" | "tileloadstart" | "tileload", fn?: TileEventHandlerFn, context?: any): this
  • off(type: "tileerror", fn?: TileErrorEventHandlerFn, context?: any): this
  • off(eventMap: LeafletEventHandlerFnMap): this
  • off(): this
  • Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • Optional fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • Optional fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • Optional fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • Optional fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • Optional fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • Optional fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • Optional fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • Optional fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • Optional fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • Optional fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • Optional fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • Optional fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • Optional fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • Optional fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • Optional fn: TileErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

  • Removes all listeners to all events on the object.

    Returns this

on

  • on(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • on(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): this
  • on(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): this
  • on(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn: LeafletEventHandlerFn, context?: any): this
  • on(type: "resize", fn: ResizeEventHandlerFn, context?: any): this
  • on(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): this
  • on(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): this
  • on(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): this
  • on(type: "locationfound", fn: LocationEventHandlerFn, context?: any): this
  • on(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): this
  • on(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): this
  • on(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): this
  • on(type: "dragend", fn: DragEndEventHandlerFn, context?: any): this
  • on(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): this
  • on(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): this
  • on(eventMap: LeafletEventHandlerFnMap): this
  • Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • fn: TileErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

onAdd

  • onAdd(map: Map): this
  • Parameters

    • map: Map

    Returns this

onRemove

  • onRemove(map: Map): this
  • Parameters

    • map: Map

    Returns this

once

  • once(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • once(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): this
  • once(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): this
  • once(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn: LeafletEventHandlerFn, context?: any): this
  • once(type: "resize", fn: ResizeEventHandlerFn, context?: any): this
  • once(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): this
  • once(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): this
  • once(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): this
  • once(type: "locationfound", fn: LocationEventHandlerFn, context?: any): this
  • once(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): this
  • once(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): this
  • once(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): this
  • once(type: "dragend", fn: DragEndEventHandlerFn, context?: any): this
  • once(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): this
  • once(type: "tileerror", fn: TileEventHandlerFn, context?: any): this
  • once(eventMap: LeafletEventHandlerFnMap): this
  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

openPopup

  • openPopup(latlng?: LatLngExpression): this
  • Parameters

    • Optional latlng: LatLngExpression

    Returns this

openTooltip

  • openTooltip(latlng?: LatLngExpression): this
  • Parameters

    • Optional latlng: LatLngExpression

    Returns this

remove

  • remove(): this
  • Returns this

removeEventListener

  • removeEventListener(type: string, fn?: LeafletEventHandlerFn, context?: any): this
  • removeEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn?: LayersControlEventHandlerFn, context?: any): this
  • removeEventListener(type: "layeradd" | "layerremove", fn?: LayerEventHandlerFn, context?: any): this
  • removeEventListener(type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag", fn?: LeafletEventHandlerFn, context?: any): this
  • removeEventListener(type: "resize", fn?: ResizeEventHandlerFn, context?: any): this
  • removeEventListener(type: "popupopen" | "popupclose", fn?: PopupEventHandlerFn, context?: any): this
  • removeEventListener(type: "tooltipopen" | "tooltipclose", fn?: TooltipEventHandlerFn, context?: any): this
  • removeEventListener(type: "locationerror", fn?: ErrorEventHandlerFn, context?: any): this
  • removeEventListener(type: "locationfound", fn?: LocationEventHandlerFn, context?: any): this
  • removeEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn?: LeafletMouseEventHandlerFn, context?: any): this
  • removeEventListener(type: "keypress" | "keydown" | "keyup", fn?: LeafletKeyboardEventHandlerFn, context?: any): this
  • removeEventListener(type: "zoomanim", fn?: ZoomAnimEventHandlerFn, context?: any): this
  • removeEventListener(type: "dragend", fn?: DragEndEventHandlerFn, context?: any): this
  • removeEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn?: TileEventHandlerFn, context?: any): this
  • removeEventListener(type: "tileerror", fn?: TileErrorEventHandlerFn, context?: any): this
  • removeEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for off(...)

    Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • Optional fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "baselayerchange" | "overlayadd" | "overlayremove"
    • Optional fn: LayersControlEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "layeradd" | "layerremove"
    • Optional fn: LayerEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomlevelschange" | "unload" | "viewreset" | "load" | "zoomstart" | "movestart" | "zoom" | "move" | "zoomend" | "moveend" | "autopanstart" | "dragstart" | "drag" | "add" | "remove" | "loading" | "error" | "update" | "down" | "predrag"
    • Optional fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "resize"
    • Optional fn: ResizeEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "popupopen" | "popupclose"
    • Optional fn: PopupEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tooltipopen" | "tooltipclose"
    • Optional fn: TooltipEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationerror"
    • Optional fn: ErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "locationfound"
    • Optional fn: LocationEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick"
    • Optional fn: LeafletMouseEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "keypress" | "keydown" | "keyup"
    • Optional fn: LeafletKeyboardEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "zoomanim"
    • Optional fn: ZoomAnimEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "dragend"
    • Optional fn: DragEndEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileunload" | "tileloadstart" | "tileload"
    • Optional fn: TileEventHandlerFn
    • Optional context: any

    Returns this

  • Parameters

    • type: "tileerror"
    • Optional fn: TileErrorEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for off(...)

    Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

removeEventParent

  • removeEventParent(obj: Evented): this
  • Removes an event parent, so it will stop receiving propagated events

    Parameters

    • obj: Evented

    Returns this

removeFrom

  • removeFrom(map: Map): this
  • Parameters

    • map: Map

    Returns this

removeLayer

  • removeLayer(layer: number | Layer): this
  • Removes the layer with the given internal ID or the given layer from the group.

    Parameters

    • layer: number | Layer

    Returns this

resetStyle

  • resetStyle(layer: Layer): Layer
  • Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.

    Parameters

    • layer: Layer

    Returns Layer

setPopupContent

  • setPopupContent(content: Content | Popup): this
  • Parameters

    • content: Content | Popup

    Returns this

setStyle

  • setStyle(style: PathOptions | StyleFunction<P>): this
  • Same as FeatureGroup's setStyle method, but style-functions are also allowed here to set the style according to the feature.

    Parameters

    • style: PathOptions | StyleFunction<P>

    Returns this

setTime

  • setTime(time: number | string): void

setTooltipContent

  • setTooltipContent(content: Content | Tooltip): this
  • Parameters

    • content: Content | Tooltip

    Returns this

setZIndex

  • setZIndex(zIndex: number): this
  • Calls setZIndex on every layer contained in this group, passing the z-index.

    Parameters

    • zIndex: number

    Returns this

toGeoJSON

  • toGeoJSON(): FeatureCollection<geojson.GeometryObject, P> | Feature<MultiPoint, P> | GeometryCollection
  • Returns a GeoJSON representation of the layer group (as a GeoJSON GeometryCollection, GeoJSONFeatureCollection or Multipoint).

    Returns FeatureCollection<geojson.GeometryObject, P> | Feature<MultiPoint, P> | GeometryCollection

togglePopup

  • togglePopup(): this
  • Returns this

toggleTooltip

  • toggleTooltip(): this
  • Returns this

unbindPopup

  • unbindPopup(): this
  • Returns this

unbindTooltip

  • unbindTooltip(): this
  • Returns this

updateDisplayedLayers

  • updateDisplayedLayers(): void

Static addInitHook

  • addInitHook(initHookFn: () => void): any & typeof Class
  • addInitHook(methodName: string, ...args: any[]): any & typeof Class
  • Parameters

    • initHookFn: () => void
        • (): void
        • Returns void

    Returns any & typeof Class

  • Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns any & typeof Class

Static asFeature

  • asFeature<P>(geojson: Feature<geojson.GeometryObject, P> | geojson.GeometryObject): Feature<geojson.GeometryObject, P>
  • Normalize GeoJSON geometries/features into GeoJSON features.

    Type parameters

    • P

    Parameters

    • geojson: Feature<geojson.GeometryObject, P> | geojson.GeometryObject

    Returns Feature<geojson.GeometryObject, P>

Static coordsToLatLng

  • coordsToLatLng(coords: [number, number] | [number, number, number]): LatLng
  • Creates a LatLng object from an array of 2 numbers (longitude, latitude) or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.

    Parameters

    • coords: [number, number] | [number, number, number]

    Returns LatLng

Static coordsToLatLngs

  • coordsToLatLngs(coords: any[], levelsDeep?: undefined | number, coordsToLatLng?: undefined | ((coords: [number, number] | [number, number, number]) => LatLng)): any[]
  • Creates a multidimensional array of LatLngs from a GeoJSON coordinates array. levelsDeep specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). Can use a custom coordsToLatLng function.

    Parameters

    • coords: any[]
    • Optional levelsDeep: undefined | number
    • Optional coordsToLatLng: undefined | ((coords: [number, number] | [number, number, number]) => LatLng)

    Returns any[]

Static extend

  • extend(props: any): { constructor: any } & typeof Class
  • Parameters

    • props: any

    Returns { constructor: any } & typeof Class

Static geometryToLayer

  • geometryToLayer<P>(featureData: Feature<geojson.GeometryObject, P>, options?: GeoJSONOptions<P>): Layer
  • Creates a Layer from a given GeoJSON feature. Can use a custom pointToLayer and/or coordsToLatLng functions if provided as options.

    Type parameters

    • P

    Parameters

    • featureData: Feature<geojson.GeometryObject, P>
    • Optional options: GeoJSONOptions<P>

    Returns Layer

Static include

  • include(props: any): any & typeof Class
  • Parameters

    • props: any

    Returns any & typeof Class

Static latLngToCoords

  • latLngToCoords(latlng: LatLng): [number, number] | [number, number, number]
  • Reverse of coordsToLatLng

    Parameters

    • latlng: LatLng

    Returns [number, number] | [number, number, number]

Static latLngsToCoords

  • latLngsToCoords(latlngs: any[], levelsDeep?: undefined | number, closed?: undefined | false | true): any[]
  • Reverse of coordsToLatLngs closed determines whether the first point should be appended to the end of the array to close the feature, only used when levelsDeep is 0. False by default.

    Parameters

    • latlngs: any[]
    • Optional levelsDeep: undefined | number
    • Optional closed: undefined | false | true

    Returns any[]

Static mergeOptions

  • mergeOptions(props: any): any & typeof Class
  • Parameters

    • props: any

    Returns any & typeof Class

Generated using TypeDoc