Class MapCollection

A generic array based collection. Implements the Symbol.iterator (e.g. [...collection])

Hierarchy

Accessors

  • get target(): null | HTMLElement
  • The currently set HTML element in which to render the maps

    Returns null | HTMLElement

  • get uniqueKey(): undefined | keyof T
  • The key by which to check uniqueness against. undefined if no uniqueness constraint is set.

    Returns undefined | keyof T

Constructors

Methods

  • Adds a map to the collection. This will set the collections target and the collections on the map. It will add map event listeners and pass them to the event handler of this collection.

    Parameters

    Returns null | number

  • Returns true, if the key exists. Returns undefined, if there is no uniqueness constraint.

    Parameters

    • value: unknown

    Returns undefined | boolean

  • Sets the active map. This will 1. get the current viewpoint of an acitve map (if one is set) 2. determine that the map to be activated can show this viewpoint or has no fallback map set and 3. activates the map 4. calls gotoViewpoint with the previous maps viewpoint

    Parameters

    • mapName: string

    Returns Promise<void>

  • Set the target for these maps.

    Parameters

    • target: string | HTMLElement

    Returns void

Properties

_activeMap: null | VcsMap<VisualisationType> = null
_cachedViewpoint: null | Viewpoint = null

if the active map is removed the last viewpoint is cached for the next mapActivation.

_layerCollection: LayerCollection = ...

Collection of layers shared amongst the maps within this collection, layers will be rendered if supported on the currently active map.

_mapPointerListeners: (() => void)[] = []

Type declaration

    • (): void
    • Returns void

_postRenderListener: (() => void) = ...

Type declaration

    • (): void
    • Returns void

_splitPosition: number = 0.5
_target: null | HTMLElement = null

Event raised if an item is added. Is passed the added item.

clippingObjectManager: ClippingObjectManager

Manages the clipping object for the maps in this collection.

eventHandler: EventHandler = ...

The map pointer event handler. The EventHandler is shared amongst all maps within the collection.

fallbackMapActivated: VcsEvent<VcsMap<VisualisationType>> = ...

Called, when a map (typically an oblique map) cannot show the current viewpoint. Is passed the map which cannot show the current viewpoint.

Called, if a map fails to initialize. The map causing the error will be removed from the collection.

mapActivated: VcsEvent<VcsMap<VisualisationType>> = ...

Called, when a map is activated. Is passed the activated map.

Event raised if an item is removed. Is passed the removed item.

splitPositionChanged: VcsEvent<number> = ...

Event raised when the maps split position changes. It passed the position as its only argument.

Generated using TypeDoc