geoview-core - v2.1.2
    Preparing search index...

    Class HoverFeatureInfoLayerSet

    A Layer-set working with the LayerApi at handling a result set of registered layers and synchronizing events happening on them (in this case when the user hovers on the map) with a store for UI updates. HoverFeatureInfoLayerSet

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    layerApi: LayerApi

    The LayerApi to work with

    The resultSet object as existing in the base class, retyped here as a TypeHoverFeatureInfoResultSet

    QUERY_TYPE: QueryType = 'at_pixel'

    The query type

    Methods

    • Clears the results for the provided layer path.

      Parameters

      • layerPath: string

        The layer path

      Returns void

    • 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

    • Protected

      Overrides the behavior to apply when deleting from the store

      Parameters

      • layerPath: string

        The layer path to delete from the store

      Returns void

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

      Parameters

      • callback: LayerSetUpdatedDelegate

        The callback function

      Returns void

    • Protected

      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

    • Overrides the behavior to apply when a hover-feature-info-layer-set wants to register a layer in its set.

      Parameters

      Returns void

    • Protected

      Overrides the behavior to apply when a hover-feature-info-layer-set wants to check for condition to register a layer in its set.

      Parameters

      Returns boolean

      True when the layer should be registered to this hover-feature-info-layer-set.

    • 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

    • Protected

      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

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

      Parameters

      • geoviewLayer: AbstractGVLayer

        The geoview layer

      • queryType: QueryType

        The query type

      • location: TypeLocation

        The location for the query

      • queryGeometry: boolean = true

        The query geometry boolean

      • OptionalabortController: AbortController

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise resolving to the query results

    • Queries the features at the provided coordinate for all the registered layers.

      Parameters

      • coordinate: Coordinate

        The pixel coordinate where to query the features when the queryType is 'at_pixel' or the map coordinate otherwise.

      • queryType: QueryType = HoverFeatureInfoLayerSet.QUERY_TYPE

        The query type, default: HoverFeatureInfoLayerSet.QUERY_TYPE.

      Returns Promise<TypeHoverResultSet>

      The hover result set results.

      When the layer couldn't be found at the given layer path.

      When the layer is of wrong type at the given layer path.

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

      Parameters

      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 of queryable type based on its class definition

      Parameters

      Returns boolean

      True if the layer is of queryable type

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