Class MapCollection

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

Hierarchy (view full)

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

  • Manages the disabling of map navigation controls. By calling this function the map navigation controls passed in the options are disabled. The remove function passed by the previous caller is executed.

    Parameters

    • options: DisableMapControlOptions

      which of the movement controls should be disabled.

    • removed: (() => void)

      the callback for when the interaction is forcefully removed.

        • (): void
        • Returns void

    Returns (() => void)

    function to reset map controls.

      • (): void
      • Returns void

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

Properties

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.