Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LayerGroup
    • LFloors

Index

Constructors

Private constructor

  • new LFloors(options: LayerOptions, allFloors: Map<string, LayerGroup<any>>, defaultFloorNumber: string, currentFloor: LayerGroup<any>, currentFloorNumber: string, additions: Map<string, Set<Layer>>): LFloors
  • Parameters

    • options: LayerOptions
    • allFloors: Map<string, LayerGroup<any>>
    • defaultFloorNumber: string
    • currentFloor: LayerGroup<any>
    • currentFloorNumber: string
    • additions: Map<string, Set<Layer>>

    Returns LFloors

Properties

Protected _map

_map: Map

Private additions

additions: Map<string, Set<Layer>>

Stores all additions to the map by floor number

Private Readonly allFloors

allFloors: Map<string, LayerGroup<any>>

Mapping from floor numbers to floors

Private Readonly control

control: FloorsControl

Control used to switch between layers on the map

Private currentFloor

currentFloor: LayerGroup<any>

Floor currently being rendered

Private currentFloorNumber

currentFloorNumber: string

Floor number of currentFloor

Optional feature

feature: GeometryCollection | FeatureCollection<Geometry, any> | Feature<MultiPoint, any>

Methods

addEventListener

  • addEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • addEventListener(type: "resize", fn: ResizeEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "locationfound", fn: LocationEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "dragend", fn: DragEndEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): LFloors
  • addEventListener(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): LFloors
  • addEventListener(eventMap: LeafletEventHandlerFnMap): LFloors
  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Alias for on(...)

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

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

addEventParent

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

    Parameters

    • obj: Evented

    Returns LFloors

addLayer

  • Parameters

    Returns LFloors

addLayerToFloor

  • addLayerToFloor(layer: Layer, floorNumber: string): LFloors
  • Adds layer to the layer group on a specific floor. Will only be rendered by Leaflet when the given floor is being rendered.

    Parameters

    • layer: Layer

      Layer to add

    • floorNumber: string

      Floor number to add the floor on

    Returns LFloors

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • addOneTimeEventListener(type: "resize", fn: ResizeEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "locationfound", fn: LocationEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "dragend", fn: DragEndEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): LFloors
  • addOneTimeEventListener(eventMap: LeafletEventHandlerFnMap): LFloors
  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Alias for once(...)

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

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

addTo

  • addTo(map: Map | LayerGroup<any>): LFloors
  • Parameters

    • map: Map | LayerGroup<any>

    Returns LFloors

Optional beforeAdd

  • Parameters

    • map: Map

    Returns LFloors

bindPopup

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

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

    Returns LFloors

bindTooltip

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

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

    Returns LFloors

clearAllEventListeners

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

    Removes all listeners to all events on the object.

    Returns LFloors

clearLayers

  • Removes all the layers from the group.

    Returns LFloors

closePopup

  • Returns LFloors

closeTooltip

  • Returns LFloors

eachLayer

  • eachLayer(fn: (layer: Layer) => void, context?: any): LFloors
  • 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 LFloors

fire

  • fire(type: string, data?: any, propagate?: boolean): LFloors
  • 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: boolean

    Returns LFloors

fireEvent

  • fireEvent(type: string, data?: any, propagate?: boolean): LFloors
  • 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: boolean

    Returns LFloors

Optional getAttribution

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

getCurrentFloor

  • getCurrentFloor(): string
  • Get the floor number of the floor currently being rendered

    Returns string

Optional getEvents

  • getEvents(): {}
  • Returns {}

    • [name: string]: LeafletEventHandlerFn

getFloors

  • getFloors(): IterableIterator<string>
  • Get the floor number for all floors

    Returns IterableIterator<string>

getLayer

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

    Parameters

    • id: number

    Returns undefined | Layer

getLayerId

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

    Parameters

    • layer: Layer

    Returns number

getLayers

  • getLayers(): Layer[]
  • Returns an array of all the layers added to the group.

    Returns Layer[]

getPane

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

    • Optional name: string

    Returns undefined | HTMLElement

getPopup

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

getTooltip

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

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[]): LFloors
  • 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 LFloors

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): LFloors
  • off(type: "baselayerchange" | "overlayadd" | "overlayremove", fn?: LayersControlEventHandlerFn, context?: any): LFloors
  • off(type: "layeradd" | "layerremove", fn?: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • off(type: "resize", fn?: ResizeEventHandlerFn, context?: any): LFloors
  • off(type: "popupopen" | "popupclose", fn?: PopupEventHandlerFn, context?: any): LFloors
  • off(type: "tooltipopen" | "tooltipclose", fn?: TooltipEventHandlerFn, context?: any): LFloors
  • off(type: "locationerror", fn?: ErrorEventHandlerFn, context?: any): LFloors
  • off(type: "locationfound", fn?: LocationEventHandlerFn, context?: any): LFloors
  • off(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn?: LeafletMouseEventHandlerFn, context?: any): LFloors
  • off(type: "keypress" | "keydown" | "keyup", fn?: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • off(type: "zoomanim", fn?: ZoomAnimEventHandlerFn, context?: any): LFloors
  • off(type: "dragend", fn?: DragEndEventHandlerFn, context?: any): LFloors
  • off(type: "tileunload" | "tileloadstart" | "tileload", fn?: TileEventHandlerFn, context?: any): LFloors
  • off(type: "tileerror", fn?: TileErrorEventHandlerFn, context?: any): LFloors
  • off(eventMap: LeafletEventHandlerFnMap): LFloors
  • off(): LFloors
  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

  • Removes all listeners to all events on the object.

    Returns LFloors

on

  • on(type: string, fn: LeafletEventHandlerFn, context?: any): LFloors
  • on(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): LFloors
  • on(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • on(type: "resize", fn: ResizeEventHandlerFn, context?: any): LFloors
  • on(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): LFloors
  • on(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): LFloors
  • on(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): LFloors
  • on(type: "locationfound", fn: LocationEventHandlerFn, context?: any): LFloors
  • on(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): LFloors
  • on(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • on(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): LFloors
  • on(type: "dragend", fn: DragEndEventHandlerFn, context?: any): LFloors
  • on(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): LFloors
  • on(type: "tileerror", fn: TileErrorEventHandlerFn, context?: any): LFloors
  • on(eventMap: LeafletEventHandlerFnMap): LFloors
  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

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

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

onAdd

  • Parameters

    • map: Map

    Returns LFloors

onRemove

  • Parameters

    • map: Map

    Returns LFloors

once

  • once(type: string, fn: LeafletEventHandlerFn, context?: any): LFloors
  • once(type: "baselayerchange" | "overlayadd" | "overlayremove", fn: LayersControlEventHandlerFn, context?: any): LFloors
  • once(type: "layeradd" | "layerremove", fn: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • once(type: "resize", fn: ResizeEventHandlerFn, context?: any): LFloors
  • once(type: "popupopen" | "popupclose", fn: PopupEventHandlerFn, context?: any): LFloors
  • once(type: "tooltipopen" | "tooltipclose", fn: TooltipEventHandlerFn, context?: any): LFloors
  • once(type: "locationerror", fn: ErrorEventHandlerFn, context?: any): LFloors
  • once(type: "locationfound", fn: LocationEventHandlerFn, context?: any): LFloors
  • once(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn: LeafletMouseEventHandlerFn, context?: any): LFloors
  • once(type: "keypress" | "keydown" | "keyup", fn: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • once(type: "zoomanim", fn: ZoomAnimEventHandlerFn, context?: any): LFloors
  • once(type: "dragend", fn: DragEndEventHandlerFn, context?: any): LFloors
  • once(type: "tileunload" | "tileloadstart" | "tileload", fn: TileEventHandlerFn, context?: any): LFloors
  • once(type: "tileerror", fn: TileEventHandlerFn, context?: any): LFloors
  • once(eventMap: LeafletEventHandlerFnMap): LFloors
  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

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

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

openPopup

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

    • Optional latlng: LatLngExpression

    Returns LFloors

openTooltip

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

    • Optional latlng: LatLngExpression

    Returns LFloors

remove

  • Returns LFloors

removeEventListener

  • removeEventListener(type: string, fn?: LeafletEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "baselayerchange" | "overlayadd" | "overlayremove", fn?: LayersControlEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "layeradd" | "layerremove", fn?: LayerEventHandlerFn, context?: any): LFloors
  • 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): LFloors
  • removeEventListener(type: "resize", fn?: ResizeEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "popupopen" | "popupclose", fn?: PopupEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "tooltipopen" | "tooltipclose", fn?: TooltipEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "locationerror", fn?: ErrorEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "locationfound", fn?: LocationEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "click" | "dblclick" | "mousedown" | "mouseup" | "mouseover" | "mouseout" | "mousemove" | "contextmenu" | "preclick", fn?: LeafletMouseEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "keypress" | "keydown" | "keyup", fn?: LeafletKeyboardEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "zoomanim", fn?: ZoomAnimEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "dragend", fn?: DragEndEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "tileunload" | "tileloadstart" | "tileload", fn?: TileEventHandlerFn, context?: any): LFloors
  • removeEventListener(type: "tileerror", fn?: TileErrorEventHandlerFn, context?: any): LFloors
  • removeEventListener(eventMap: LeafletEventHandlerFnMap): LFloors
  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • 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 LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Parameters

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

    Returns LFloors

  • Alias for off(...)

    Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns LFloors

removeEventParent

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

    Parameters

    • obj: Evented

    Returns LFloors

removeFrom

  • Parameters

    • map: Map

    Returns LFloors

removeLayer

  • Parameters

    Returns LFloors

setFloor

  • Switch the currently rendered floor to floor. Has no effect if floor is already the currently rendered floor.

    Parameters

    • floor: string

      Floor to switch to

    Returns LFloors

setPopupContent

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

    • content: Popup | Content

    Returns LFloors

setTooltipContent

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

    • content: Content | Tooltip

    Returns LFloors

setZIndex

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

    Parameters

    • zIndex: number

    Returns LFloors

Private startDrawingFloor

  • startDrawingFloor(floor: LayerGroup<any>, floorNumber: string): void
  • Make Leaflet start rendering floor on the map

    Parameters

    • floor: LayerGroup<any>

      Floor to start rendering

    • floorNumber: string

      Number of the floor to render

    Returns void

Private stopDrawingFloor

  • stopDrawingFloor(floor: LayerGroup<any>, floorNumber: string): void
  • Make Leaflet stop rendering floor on the map

    Parameters

    • floor: LayerGroup<any>

      Floor to stop rendering

    • floorNumber: string

      Number of the floor to stop rendering

    Returns void

toGeoJSON

  • toGeoJSON(precision?: number): GeometryCollection | FeatureCollection<Geometry, any> | Feature<MultiPoint, any>
  • Returns a GeoJSON representation of the layer group (as a GeoJSON GeometryCollection, GeoJSONFeatureCollection or Multipoint).

    Parameters

    • Optional precision: number

    Returns GeometryCollection | FeatureCollection<Geometry, any> | Feature<MultiPoint, any>

togglePopup

  • Returns LFloors

toggleTooltip

  • Returns LFloors

unbindPopup

  • Returns LFloors

unbindTooltip

  • Returns LFloors

Static addInitHook

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

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

    Returns any

  • Parameters

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

    Returns any

Static extend

  • extend(props: any): new (...args: any[]) => any & typeof Class
  • Parameters

    • props: any

    Returns new (...args: any[]) => any & typeof Class

Static include

  • include(props: any): any
  • Parameters

    • props: any

    Returns any

Static mergeOptions

  • mergeOptions(props: any): any
  • Parameters

    • props: any

    Returns any

Static new

  • new(map: MapData, defaultFloorNumber: string, options: LayerOptions): Result<LFloors, string>
  • Creates a new layer that allows for switching between floors of a building.

    Parameters

    • map: MapData

      The map data object for the map

    • defaultFloorNumber: string

      The number of the floor to start on

    • options: LayerOptions

      Any extra Leaflet layer options

    Returns Result<LFloors, string>

Generated using TypeDoc