Class Layer<I>

Abstract base class for Layers. To create a layer Implementation the function createImplementationsForMap has to be implemented. To receive implementation options, implement geImplementationOptions

Type Parameters

Hierarchy

Accessors

  • get className(): string
  • Returns string

  • get exclusive(): boolean
  • Indicates, that this layer is part of an exclusiveGroup

    Returns boolean

  • get exclusiveGroups(): (string | symbol)[]
  • An array of arbitrary exclusive groups

    Returns (string | symbol)[]

  • set exclusiveGroups(groups): void
  • Parameters

    • groups: (string | symbol)[]

    Returns void

  • get headers(): undefined | Record<string, string>
  • directly manipulating the headers Object will not trigger a reload. Reload the data via layer.reload() manually.

    Returns undefined | Record<string, string>

  • set headers(headers): void
  • Parameters

    • headers: undefined | Record<string, string>

    Returns void

  • get initialized(): boolean
  • True if this layer has been initialized, typically after its first activation.

    Returns boolean

  • get locale(): string
  • returns the currently set locale. Can be used to provide locale specific URLs.

    Returns string

  • set locale(value): void
  • sets the locale and reloads the layer the if the URL is a locale aware Object.

    Parameters

    • value: string

    Returns void

  • get url(): string
  • A layers url, should on be configured, else an empty string

    Returns string

  • set url(url): void
  • Parameters

    • url: string | Record<string, string>

    Returns void

Constructors

Methods

  • Activates this layer object, i.e. changes its internal view state and updates the map. The returned promise resolves, once the layer & any _implementations are initialized and all data is loaded. Once the promise resolves, the layer can still be inactive, if deactivate was called while initializing the layer.

    Returns Promise<void>

  • creates an array of layer implementations for the given map.

    Parameters

    Returns I[]

    return the specific implementation

  • Deactivates a layer, changing the internal view state

    Returns void

  • destroys all current implementations and recreates the ones which have an active map. called for instance when the URL for a layer changes

    Returns Promise<void>

  • Returns all implementation of this layer for all maps

    Returns I[]

  • creates or returns a cached array of layer implementations for the given map.

    Type Parameters

    Parameters

    • map: T

      initialized Map

    Returns I[]

    return the specific implementation

  • returns the Extent of this layer or null, if the layers extent was not defined or cannot be established

    Returns null | Extent

  • initializes the layer, can be used to defer loading

    Returns Promise<void>

  • is called from the map when the map is activated, and this layer is in the layerCollection of the map. Will create an implementation if it does not exits and will forward the activation call to the implementation.

    Parameters

    Returns Promise<void>

    Link

  • is called from the map when the map is deactivated, and this layer is in the layerCollection of the map. will forward deactivation call to the map specific implementation

    Parameters

    Returns void

  • Reloads all the data loaded and forces a redraw

    Returns Promise<void>

  • is called when a layer is removed from the layer collection of a map or said map is destroyed. destroys the associated implementation.

    Parameters

    Returns void

Properties

[moduleIdSymbol]?: string
_activeMaps: Set<VcsMap<VisualisationType>>
_allowPicking: boolean
_exclusiveGroups: (string | symbol)[]
_globalHider: undefined | GlobalHider
_headers?: Record<string, string>
_hiddenObjectIds: string[]

array of object Ids which should be hidden within the context of the layers layerCollection, if this layer is active

_implementations: Map<VcsMap<VisualisationType>, I[]>
_initialized: boolean
_loadingPromise: null | Promise<void>
_locale: string
_state: LayerState
_supportedMaps: string[]

The class names of the supported maps.

_url: undefined | string | Record<string, string>
_zIndex: number
activeOnStartup: boolean
copyright: undefined | CopyrightOptions
datasourceId?: string

Optional Id to synchronize with the vcPublisher Datasources. This can also be used to track a connection to other sources of data.

exclusiveGroupsChanged: VcsEvent<(string | symbol)[]>

event raised if the exclusives group of the layer changes. is passed the array of exclusive groups as its only argument

extent: null | Extent
featureProvider: undefined | AbstractFeatureProvider

An optional feature provider to provider features based on click events.

isDestroyed: boolean
mapNames: string[]
name: string

unique Name

properties: Record<string, unknown>
stateChanged: VcsEvent<LayerState>

Event raised, if the layers state changes. Is passed the LayerState as its only parameter

zIndexChanged: VcsEvent<number>

Called when the zIndex of this layer is changed. Is passed the new zIndex as its only argument.

Generated using TypeDoc