geoview-core
    Preparing search index...

    Class AbstractLayerSetAbstract

    A class to hold a set of layers associated with a value of any type. Layers are added/removed to the layer-set via the registerOrUnregisterLayer function. AbstractLayerSet

    Hierarchy (View Summary)

    Index

    Constructors

    • Constructs a new LayerSet instance.

      Parameters

      • layerApi: LayerApi

        The LayerApi instance to work with.

      Returns AbstractLayerSet

    Properties

    layerApi: LayerApi

    The LayerApi to work with

    resultSet: TypeResultSet = {}

    An object containing the result sets indexed using the layer path

    Methods

    • A quick getter to help identify which layerset class the current instance is coming from.

      Returns string

    • Gets the MapId for the layer set

      Returns string

    • Gets the registered layer paths based on the registered layers

      Returns string[]

      An array of layer paths

    • Unregisters a callback from being called whenever the layer set is updated.

      Parameters

      • callback: LayerSetUpdatedDelegate

        The callback function to unregister

      Returns void

    • A must-override method called to delete a result set entry from the store

      Parameters

      • layerPath: string

        The layer path to delete from store

      Returns void

    • Registers a callback to be executed whenever the layer set is updated.

      Parameters

      • callback: LayerSetUpdatedDelegate

        The callback function

      Returns void

    • An overridable layer set updated function for a layer-set to indicate the layer set has been updated.

      Parameters

      • layerPath: string

        The layer path

      Returns void

    • An overridable function for a layer-set to process a layer status changed event.

      Parameters

      • layerConfig: ConfigBaseClass

        The layer config

      • layerStatus: TypeLayerStatus

        The new layer status

      Returns void

    • An overridable function for a layer-set to process a layer name change.

      Parameters

      • layerPath: string

        The layer path being affected

      • name: string

        The new layer name

      Returns void

    • A must-override method called to propagate the result set entry to the store

      Parameters

      • resultSetEntry: TypeResultSetEntry

        The result set entry to propagate

      • type: PropagationType

      Returns void

    • An overridable registration function for a layer-set that the registration process will use to create a new entry in the layer set for a specific geoview layer and layer path.

      Parameters

      • layer: AbstractBaseLayer

        The layer config

      Returns void

    • An overridable registration condition function for a layer-set to check if the registration should happen for a specific geoview layer and layer path. By default, a layer-set always registers layers except when they are group layers.

      Parameters

      • layer: AbstractBaseLayer

        The layer

      Returns boolean

      True if the layer should be registered, false otherwise

    • An overridable registration function for a layer-set that the registration process will use to create a new entry in the layer set for a specific geoview layer and layer path.

      Parameters

      • layerConfig: ConfigBaseClass

        The layer config

      Returns void

    • An overridable registration condition function for a layer-set to check if the registration should happen for a specific geoview layer and layer path.

      Parameters

      • layerConfig: ConfigBaseClass

        The layer config

      Returns boolean

      True if the layer config should be registered, false otherwise

    • An overridable unregistration function for a layer-set that the registration process will use to unregister a specific geoview layer.

      Parameters

      • layer: AbstractBaseLayer | undefined

        The layer

      Returns void

    • An overridable unregistration function for a layer-set that the registration process will use to unregister a specific layer config.

      Parameters

      • layerConfig: ConfigBaseClass | undefined

        The layer config

      Returns void

    • Registers the layer in the layer-set. If the layer is already registered, the function returns immediately.

      Parameters

      • layer: AbstractBaseLayer

        The layer to register

      Returns Promise<void>

    • Registers the layer config in the layer-set.

      Parameters

      • layerConfig: ConfigBaseClass

        The layer config

      Returns void

    • Unregisters the layer config and layer from the layer-set.

      Parameters

      • layerPath: string

        The layer path

      Returns void

    • Protected

      Align records with informatiom provided by OutFields from layer config. This will update fields in and delete unwanted fields from the arrayOfRecords

      Parameters

      • layerEntryConfig: AbstractBaseLayerEntryConfig

        The layer entry config object.

      • arrayOfRecords: TypeFeatureInfoEntry[]

        Features to delete fields from.

      Returns void

    • Checks if the layer is in visible range.

      Parameters

      • layer: AbstractGVLayer

        The layer

      • currentZoom: number | undefined

        The map current zoom level

      Returns boolean

      True if the state is queryable or undefined

    • Checks if the layer is of queryable type based on its class definition

      Parameters

      • layer: AbstractBaseLayer

        The layer

      Returns boolean

      True if the layer is of queryable type

    • Checks if the layer config source is queryable.

      Parameters

      • layer: AbstractBaseLayer

        The layer

      Returns boolean

      True if the source is queryable or undefined

    • Processes layer data to query features on it, if the layer path can be queried.

      Parameters

      • map: Map

        The Map to query layer features from.

      • geoviewLayer: AbstractGVLayer

        The geoview layer

      • queryType: QueryType

        The query type

      • location: TypeLocation

        The location for the query

      • queryGeometry: boolean = true

        The query geometry boolean

      • abortController: AbortController | undefined = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoEntry[]>

      A promise resolving to the query results

    • Protected

      Determines whether the retrieved feature info records contain real attribute fields (i.e., key–value properties) or whether they were returned in a fallback HTML/plain-text form, which commonly occurs with WMS GetFeatureInfo responses. This is used primarily to detect when a WMS service cannot return structured feature attributes and instead provides the feature data as a single HTML or plain-text block. Logic summary:

      • For WMS layers (OgcWmsLayerEntryConfig):
        • If the first record contains exactly one property and that property is either html or plain_text, the method considers the response not to contain actual fields.
      • For all other cases, the method assumes records contain valid structured attributes.

      Parameters

      • layerConfig: AbstractBaseLayerEntryConfig

        The layer configuration used to determine whether special WMS handling applies.

      • arrayOfRecords: TypeFeatureInfoEntry[]

        The retrieved feature info entries representing attributes or raw text content.

      Returns boolean

      true if the feature info records contain real attribute fields; false if they consist only of fallback HTML or plain-text content.