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

    Class GVWMS

    Manages a WMS layer.

    GVWMS

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    emitMessage formatFeatureInfoResult getAllFeatureInfo getAttributions getBounds getClassName getExtent getExtentFromFeatures getFeatureInfo getFeatureInfoAtCoordinate getFeatureInfoAtLonLat getFeatureInfoAtPixel getFeatureInfoUsingBBox getFeatureInfoUsingPolygon getFilterFromStyle getGeoviewLayerId getGeoviewLayerName getGetFeatureInfoFeatureCount getGetFeatureInfoTolerance getHitTolerance getHoverable getInVisibleRange getIsTimeAware getLayerConfig getLayerFilters getLayerName getLayerPath getLayerStatus getLegend getMaxZoom getMetadataExtent getMetadataProjection getMinZoom getOLLayer getOLSource getOpacity getOverrideCRS getParent getParentRoot getParents getQueryable getStyle getStyleItemVisibility getTimeDimension getVisible getVisibleIncludingParents init inVisibleRange offImageLoadRescue offLayerError offLayerFilterApplied offLayerFirstLoaded offLayerHoverableChanged offLayerLoaded offLayerLoading offLayerMessage offLayerNameChanged offLayerOpacityChanged offLayerQueryableChanged offLayerStyleChanged offLegendQueried offLegendQuerying offVisibleChanged onError onErrorDecipherError onFetchLegend onGetAttributions onGetBounds onGetExtentFromFeatures onImageLoadError onImageLoadErrorDecipherError onImageLoadRescue onLayerError onLayerFilterApplied onLayerFirstLoaded onLayerHoverableChanged onLayerLoaded onLayerLoading onLayerMessage onLayerNameChanged onLayerOpacityChanged onLayerQueryableChanged onLayerStyleChanged onLegendQueried onLegendQuerying onLoaded onLoading onRefresh onSetLayerFilters onSetOpacity onSetStyleAccordingToLegend onVisibleChanged queryLegend refresh setExtent setGetFeatureInfoFeatureCount setGetFeatureInfoTolerance setHoverable setLayerFilters setLayerFiltersDate setLayerName setLegend setMaxZoom setMinZoom setOLLayer setOpacity setOverrideCRS setParent setQueryable setStyle setStyleItemVisibility setVisible setWmsStyle waitForRender waitForSourceReady waitLegendFetched waitLoadedOnce waitLoadedStatus waitStyleApplied applyViewFilterOnSource createLegendFromStyle fetchAndParseFeaturesFromWFSUrl getFeatureIconSource helperFormatFeatureInfoResult helperGetFieldValue initOptionsWithInitialSettings

    Constructors

    • Constructs a GVWMS layer to manage an OpenLayer layer.

      Parameters

      • olSource: ImageWMS

        The OpenLayer source.

      • layerConfig: OgcWmsLayerEntryConfig

        The layer configuration.

      Returns GVWMS

    Properties

    loadedOnce: boolean = false

    Indicates if the layer has become in loaded status at least once already

    loadingCounter: number = 0

    Counts the number of times the loading happened.

    loadingMarker: number = 0

    Marks the latest loading count for the layer. This useful to know when the put the layer loaded status back correctly with parallel processing happening

    DEFAULT_GET_FEATURE_INFO_TOLERANCE: number = 20

    The default Get Feature Info tolerance to use for QGIS Server services which are more picky by default (really needs to be zoomed in to get results, by default)

    DEFAULT_HIT_TOLERANCE: number = 4

    The default hit tolerance the query should be using

    DEFAULT_LOADING_PERIOD: number = ...

    The default loading period before we show a message to the user about a layer taking a long time to render on map

    DEFAULT_MAX_FEATURE_COUNT: number = 100

    The max feature count returned by the GetFeatureInfo

    Methods

    • Protected

      Emits a layer-specific message event with localization support

      Parameters

      • messageKey: string

        The key used to lookup the localized message OR message

      • messageParams: unknown[] | undefined

        Array of parameters to be interpolated into the localized message

      • messageType: SnackbarType = 'info'

        The message type

      • Optionalnotification: boolean = false

        Whether to show this as a notification. Defaults to false

      Returns void

      this.emitMessage(
      'layers.fetchProgress',
      ['50', '100'],
      messageType: 'error',
      true
      );

      LayerMessageEvent

    • Formats a list of features into an array of TypeFeatureInfoEntry, including icons, field values, domains, and metadata.

      Parameters

      • features: Feature<Geometry>[]

        Array of features to format.

      • layerConfig:
            | EsriDynamicLayerEntryConfig
            | VectorLayerEntryConfig
            | EsriImageLayerEntryConfig
            | OgcWmsLayerEntryConfig

        Configuration of the associated layer.

      • OptionalserviceDateFormat: string

        The date format used by the service, if applicable.

      • OptionalserviceDateIANA: string

        The IANA time zone identifier used by the service, if applicable.

      • OptionalserviceDateTemporalMode: TemporalMode

        When calendar, treats the input as a calendar-date-only value (no timezones). When 'instant', treats the input as moment in time (timezones aware).

      Returns TypeFeatureInfoEntry[]

      An array of TypeFeatureInfoEntry objects.

    • Protected

      Overrides the get all feature information for all the features stored in the layer. This function performs a WFS 'GetFeature' query operation using the WFS layer configuration embedded in the WMS layer configuration.

      Parameters

      • map: Map

        The Map so that we can grab the resolution/projection we want to get features on.

      • layerFilters: LayerFilters

        The layer filters to apply when querying the features.

      • OptionalabortController: AbortController

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

      If no WFS layer configuration is defined for this WMS layer.

      When the response is not OK (non-2xx).

      When the JSON response is empty.

      When the request exceeds the timeout duration.

      When the request was aborted by the caller's signal.

      When a network issue happened.

    • Gets the attributions for the layer by calling the overridable function 'onGetAttributions'. When the layer is a GVLayer, its layer attributions are returned. When the layer is a GVGroup, all layers attributions in the group are returned.

      Returns string[]

      The layer attributions.

    • Gets the bounds for the layer in the given projection. When the layer is a GVLayer, its layer bounds are returned. When the layer is a GVGroup, an Extent union of all layers bounds in the group is returned.

      Parameters

      • projection: Projection

        The projection to get the bounds into.

      • stops: number

        The number of stops to use to generate the extent.

      Returns Promise<Extent | undefined>

      A promise of layer bounding box.

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

      Returns string

    • Returns the extent of the layer or undefined if it will be visible regardless of extent. The layer extent is an array of numbers representing an extent: [minx, miny, maxx, maxy]. The extent is used to clip the data displayed on the map.

      Returns Extent | undefined

      The layer extent.

    • Gets the extent of an array of features.

      Parameters

      • objectIds: string[] | number[]

        The IDs of the features to calculate the extent from.

      • outProjection: Projection

        The output projection for the extent.

      • Optionaloutfield: string

        Optional. ID field to return for services that require a value in outfields.

      Returns Promise<Extent>

      The extent of the features, if available

    • Returns feature information for the layer specified.

      Parameters

      • map: Map

        The Map to get feature info from.

      • queryType: QueryType

        The type of query to perform.

      • location: TypeLocation

        An pixel, coordinate or polygon that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      The feature info table.

    • Protected

      Overrides the return of feature information at a given coordinate.

      Parameters

      • map: Map

        The Map where to get Feature Info At Coordinate from.

      • location: Coordinate

        The coordinate that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

    • Protected

      Overrides the return of feature information at the provided long lat coordinate.

      Parameters

      • map: Map

        The Map where to get Feature Info At LonLat from.

      • lonlat: Coordinate

        The coordinate that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

      If no WFS layer configuration is defined for this WMS layer.

    • Overridable function to return of feature information at a given pixel location.

      Parameters

      • map: Map

        The Map where to get Feature Info At Pixel from.

      • location: Pixel

        The pixel coordinate that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of TypeFeatureInfoResult.

    • Overridable function to return of feature information at the provided bounding box.

      Parameters

      • map: Map

        The Map where to get Feature using BBox from.

      • location: Coordinate[]

        The bounding box that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

      When the function isn't overridden by the children class.

    • Overridable function to return of feature information at the provided polygon.

      Parameters

      • map: Map

        The Map where to get Feature Info using Polygon from.

      • location: Coordinate[]

        The polygon that will be used by the query.

      • queryGeometry: boolean = true

        Whether to include geometry in the query, default is true.

      • OptionalabortController: AbortController = undefined

        The optional abort controller.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

      When the function isn't overridden by the children class.

    • Builds and returns a filter expression derived from the layer's style configuration. This method delegates the filter extraction logic to GeoviewRenderer.getFilterFromStyle, using the current layer configuration (outfields, style, and style settings).

      Returns string | undefined

      A filter expression string if one can be derived from the style, or undefined if no filter applies.

    • Gets the Geoview layer id.

      Returns string

      The geoview layer id

    • Gets the geoview layer name.

      Returns string | undefined

      The layer name

    • Gets the feature count used for GetFeatureInfo requests.

      Returns number

      The current GetFeatureInfo feature count.

    • Gets the current pixel tolerance used for GetFeatureInfo requests for QGIS Server Services.

      Returns number

      The current GetFeatureInfo pixel tolerance.

    • Gets the hit tolerance associated with the layer.

      Returns number

      The hit tolerance

    • Indicates if the layer is currently hoverable.

      Returns boolean

      The currently hoverable flag.

    • Gets the in visible range value

      Parameters

      • currentZoom: number | undefined

        Optional. The map current zoom

      Returns boolean

      True if the layer is in visible range

    • Gets the flag if layer use its time dimension, this can be use to exclude layers from time function like time slider

      Returns boolean

      The flag indicating if the layer should be included in time awareness functions such as the Time Slider. True by default.

    • Overrides the parent class's getter to provide a more specific return type (covariant return).

      Returns OgcWmsLayerEntryConfig

      The strongly-typed layer configuration specific to this layer.

    • Gets the layer filters associated to the layer.

      Returns LayerFilters

      The filter associated to the layer or undefined.

    • Gets the layer name or falls back on the layer name in the layer configuration.

      Returns string

      The layer name

    • Gets the layer path associated with the layer.

      Returns string

      The layer path

    • Gets the layer status

      Returns TypeLayerStatus

      The layer status

    • Gets the legend associated with the layer.

      Returns TypeLegend | undefined

      The layer legend

    • Gets the max zoom of the layer.

      Returns number

      The max zoom of the layer.

    • Gets the metadata extent, if any.

      Returns Extent | undefined

      The OpenLayer projection

    • Gets the metadata extent projection, if any.

      Returns Projection | undefined

      The OpenLayer projection

    • Gets the min zoom of the layer.

      Returns number

      The min zoom of the layer.

    • Overrides the parent method to return a more specific OpenLayers layer type (covariant return).

      Returns ImageLayer<ImageWMS>

      The strongly-typed OpenLayers type.

    • Overrides the parent class's method to return a more specific OpenLayers source type (covariant return).

      Returns ImageWMS

      The ImageWMS source instance associated with this layer.

    • Gets the opacity of the layer (between 0 and 1).

      Returns number

      The opacity of the layer.

    • Gets if the CRS is to be overridden, because the layer struggles with the current map projection.

      Returns CRSOverride | undefined

      The CRS Override properties if any.

    • Returns the direct parent GVGroupLayer of this layer, if any.

      Returns GVGroupLayer | undefined

      The direct parent group layer, or undefined if this layer is not contained within any group.

      This method searches through the provided root group layer collection to determine which group directly contains this layer. If the layer is nested within multiple groups, only the immediate parent group is returned.

    • Returns the top-most (root) GVGroupLayer ancestor of this layer, if any.

      Returns GVGroupLayer | undefined

      The highest ancestor group layer in the hierarchy, or undefined if this layer does not belong to any group.

    • Retrieves all parent group layers of this layer in hierarchical order.

      The returned array starts with the immediate parent and continues up the hierarchy until the root group layer is reached or a group has already been visited (not supposed to happen).

      Returns GVGroupLayer[]

      An array of parent GVGroupLayer instances, ordered from the immediate parent to the top-most ancestor. Returns an empty array if the layer has no parent.

      This method traverses upward through the parent chain starting from the immediate parent of this layer. A protection mechanism prevents infinite loops in case of circular parent references.

    • Indicates if the layer is currently queryable.

      Returns boolean

      The currently queryable flag.

    • Gets the layer style

      Returns
          | Partial<
              Record<
                  | "Point"
                  | "MultiPoint"
                  | "LineString"
                  | "MultiLineString"
                  | "Polygon"
                  | "MultiPolygon",
                  TypeLayerStyleSettings,
              >,
          >
          | undefined

      The layer style

    • Gets the style item visibility on the layer.

      Parameters

      • item: TypeLegendItem

        The style item to toggle visibility on

      Returns boolean

      The visibility of the style item

    • Gets the temporal dimension that is associated to the layer.

      Returns TimeDimension | undefined

      The temporal dimension associated to the layer or undefined.

    • Gets the visibility of the layer (true or false).

      Returns boolean

      The visibility of the layer.

    • Determines whether this layer is visible, taking into account the visibility of all its parent groups. A layer is considered visible only if:

      • the layer itself is visible, and
      • every parent GVGroupLayer up the hierarchy is also visible. This function walks upward through the group layer tree until it reaches the root, returning false immediately if any parent is not visible.

      Returns boolean

      true if this layer and all its parent groups are visible; otherwise false.

    • Initializes the GVLayer. This function checks if the source is ready and if so it calls onLoaded() to pursue initialization of the layer. If the source isn't ready, it registers to the source ready event to pursue initialization of the layer once its source is ready.

      Returns void

    • Checks if layer is visible at the given zoom

      Parameters

      • zoom: number

        Zoom level to be compared

      Returns boolean

      If the layer is visible at this zoom level

    • Unregisters an image load callback event handler.

      Parameters

      Returns void

    • Unregisters when a layer is turning into a error stage event handler.

      Parameters

      • callback: LayerErrorDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a filter applied event handler.

      Parameters

      • callback: LayerFilterAppliedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters when a layer have been first loaded on the map event handler.

      Parameters

      • callback: LayerDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters an hoverable changed event handler.

      Parameters

      • callback: LayerHoverableChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters when a layer is turning into a loaded stage event handler.

      Parameters

      • callback: LayerDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters when a layer is turning into a loading stage event handler.

      Parameters

      • callback: LayerDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a layer message event handler.

      Parameters

      • callback: LayerMessageDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a layer name changed event handler.

      Parameters

      • callback: LayerNameChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters an opacity changed event handler.

      Parameters

      • callback: LayerOpacityChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters an queryable changed event handler.

      Parameters

      • callback: LayerQueryableChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a layer style changed event handler.

      Parameters

      • callback: StyleChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a legend queried event handler.

      Parameters

      • callback: LegendQueriedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a legend querying event handler.

      Parameters

      • callback: LegendQueryingDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Unregisters a visible changed event handler.

      Parameters

      • callback: VisibleChangedDelegate

        The callback to stop being called whenever the event is emitted

      Returns void

    • Overridable method called when the layer is in error and couldn't be loaded correctly.

      Parameters

      • error: GeoViewError

        The error which is being raised.

      Returns void

    • Overridable method called to get a more specific error code for all errors.

      Parameters

      • event: Event

        The event which is being triggered.

      Returns GeoViewError

      A LayerFailedToLoadError error.

    • Overrides the fetching of the legend for a WMS layer.

      Returns Promise<TypeLegend | null>

      The legend of the layer or null.

    • Overrides the way the attributions are retrieved.

      Returns string[]

      The layer attributions

    • Overrides the way to get the bounds for this layer type.

      Parameters

      • projection: Projection

        The projection to get the bounds into.

      • stops: number

        The number of stops to use to generate the extent.

      Returns Promise<Extent | undefined>

      A promise of layer bounding box.

    • Sends a query to get feature and calculates an extent from them.

      Parameters

      • objectIds: string[] | number[]

        The IDs of the features to calculate the extent from.

      • outProjection: Projection

        The output projection for the extent.

      • Optionaloutfield: string

        ID field to return for services that require a value in outfields.

      Returns Promise<Extent>

      The extent of the features, if available.

      If no WFS layer configuration is defined for this WMS layer.

      When the no outfields has the type 'oid'.

      When the extent couldn't be computed.

      When the response is not OK (non-2xx).

      When the JSON response is empty.

      When the request exceeds the timeout duration.

      When the request was aborted by the caller's signal.

      When a network issue happened.

    • Overrides when the layer image is in error and couldn't be loaded correctly.

      Parameters

      • error: GeoViewError

        The error which has been triggered.

      Returns void

    • Deciphers an image load error event and returns a corresponding localized error message key. This override inspects the failed image request to detect more specific failure scenarios before falling back to a generic error message. The method currently checks for:

      • Image size exceeding the service-defined MaxWidth or MaxHeight constraints (if available in service metadata).
      • An empty image response (zero width or height). If none of the specific conditions are met, a generic image load error message key is returned.

      Parameters

      • event: Event

        The image load error event triggered by the image source.

      Returns GeoViewError

      A GeoView Error representing the error.

    • Registers an image load callback event handler.

      Parameters

      Returns void

    • Registers when a layer is turning into a error stage event handler.

      Parameters

      • callback: LayerErrorDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a filter applied event handler.

      Parameters

      • callback: LayerFilterAppliedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers when a layer have been first loaded on the map event handler.

      Parameters

      • callback: LayerDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers an hoverable changed event handler.

      Parameters

      • callback: LayerHoverableChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers when a layer is turning into a loaded stage event handler.

      Parameters

      • callback: LayerDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers when a layer is turning into a loading stage event handler.

      Parameters

      • callback: LayerDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a layer message event handler.

      Parameters

      • callback: LayerMessageDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a layer name changed event handler.

      Parameters

      • callback: LayerNameChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers an opacity changed event handler.

      Parameters

      • callback: LayerOpacityChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers an queryable changed event handler.

      Parameters

      • callback: LayerQueryableChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a layer style changed event handler.

      Parameters

      • callback: StyleChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a legend queried event handler.

      Parameters

      • callback: LegendQueriedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Registers a legend querying event handler.

      Parameters

      • callback: LegendQueryingDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Overridable method called when the layer has been loaded correctly.

      Returns void

    • Overridable method called when the layer has started to load itself on the map.

      Returns void

    • Overrides the refresh function to refresh the layer source.

      Parameters

      • projection: Projection | undefined

        Optional, the projection to refresh to.

      Returns void

    • Protected

      Overrides the way a WMS layer applies a view filter. It does so by updating the source FILTER and TIME parameters.

      Parameters

      • Optionalfilter: LayerFilters

        An optional filter to be used in place of the getViewFilter value.

      Returns void

    • Overridable method to set the opacity of the layer.

      If the layer has a parent, the provided opacity is clamped so that it cannot be greater than the parent's opacity. The resulting opacity is applied to the underlying OpenLayers layer.

      If the layer is a GVGroupLayer, the computed opacity is recursively applied to all child layers to maintain consistency within the layer hierarchy.

      Optionally emits a layer opacity change event.

      Parameters

      • opacity: number

        The desired opacity for the layer, typically between 0 (fully transparent) and 1 (fully opaque).

      • emitOpacityChanged: boolean = true

        Optional, whether to emit a layer opacity changed event after updating the opacity. Defaults to true.

      Returns void

    • Overridable function set the style according to the fetched legend information

      Parameters

      Returns void

    • Registers a visible changed event handler.

      Parameters

      • callback: VisibleChangedDelegate

        The callback to be executed whenever the event is emitted

      Returns void

    • Queries the legend. This function raises legend querying and queried events. It calls the overridable onFetchLegend() function.

      Returns Promise<TypeLegend | null>

      The promise when the legend (or null) will be received.

    • Refreshes the layer by calling the overridable function 'onRefresh'. When the layer is a GVLayer its layer source is refreshed. When the layer is a GVGroup, all layers in the group are refreshed.

      Parameters

      • projection: Projection | undefined

        Optional, the projection to refresh to.

      Returns void

    • Sets the extent of the layer. Use undefined if it will be visible regardless of extent. The layer extent is an array of numbers representing an extent: [minx, miny, maxx, maxy].

      Parameters

      • layerExtent: Extent

        The extent to assign to the layer.

      Returns void

    • Sets the feature count used for GetFeatureInfo requests.

      Parameters

      • value: number

        The new GetFeatureInfo feature count.

      Returns void

    • Sets the current pixel tolerance used for GetFeatureInfo requests for QGIS Server Services.

      Parameters

      • value: number

        The new GetFeatureInfo pixel tolerance.

      Returns void

    • Sets if the layer is currently hoverable.

      Parameters

      • hoverable: boolean

        The hoverable value.

      Returns void

    • Sets the layer filters associated to the layer.

      Parameters

      • layerFilters: LayerFilters

        The filter layers associated to the layer or undefined.

      • refresh: boolean | undefined

      Returns void

    • Applies a time filter on a date range.

      Parameters

      • date1: string

        The start date

      • date2: string

        The end date

      Returns void

    • Sets the layer name

      Parameters

      • name: string | undefined

        The layer name

      Returns void

    • Sets the legend associated with the layer.

      Parameters

      Returns void

    • Sets the max zoom of the layer.

      Parameters

      • maxZoom: number

        The max zoom of the layer.

      Returns void

    • Sets the min zoom of the layer.

      Parameters

      • minZoom: number

        The min zoom of the layer.

      Returns void

    • Sets the OpenLayers Layer

      Parameters

      • layer: BaseLayer

        The OpenLayers Layer

      Returns void

    • Sets the opacity of the layer while ensuring it does not exceed the opacity of its parent layer.

      If the layer has a parent, the provided opacity is clamped so that it cannot be greater than the parent's opacity. The resulting opacity is applied to the underlying OpenLayers layer.

      If the layer is a GVGroupLayer, the computed opacity is recursively applied to all child layers to maintain consistency within the layer hierarchy.

      Optionally emits a layer opacity change event.

      Parameters

      • opacity: number

        The desired opacity for the layer, typically between 0 (fully transparent) and 1 (fully opaque).

      • emitOpacityChanged: boolean = true

        Optional, whether to emit a layer opacity change event after updating the opacity. Defaults to true.

      Returns void

    • Sets if the CRS is to be overridden, because the layer struggles with the current map projection.

      Parameters

      • value: CRSOverride | undefined

        The CRS Override properties or undefined.

      Returns void

    • Sets the parent layer

      Parameters

      • parent: GVGroupLayer | undefined

        The parent layer for the current layer if any.

      Returns void

    • Sets if the layer is currently queryable.

      Parameters

      • queryable: boolean

        The queryable value.

      Returns void

    • Sets the layer style

      Parameters

      • style: TypeLayerStyleConfig

        The layer style

      Returns void

    • Updates the visibility of a style item on the layer and triggers a re-render. This method mutates the layer's style configuration for the specified legend item, calls changed() on the underlying OpenLayers layer to schedule a new render, and optionally waits for the next render cycle to complete.

      Parameters

      • item: TypeLegendItem

        The legend/style item whose visibility will be updated.

      • visibility: boolean

        Whether the style item should be visible.

      • waitForRender: boolean

        When true, waits for the next layer render to complete before resolving.

      Returns Promise<void>

      A promise that resolves after the visibility has been updated and, if requested, the layer has finished rendering.

    • Sets the visibility of the layer (true or false).

      Parameters

      • layerVisibility: boolean

        The visibility of the layer.

      Returns void

    • Sets the style id to be used by the WMS layer.

      Parameters

      • wmsStyleId: string

        The style identifier to be used.

      Returns void

    • Waits for the next render cycle of the underlying OpenLayers layer to complete. Resolves the returned promise after the layer emits a postrender event, indicating that it has finished rendering for a frame.

      Returns Promise<void>

      A promise that resolves after the layer has rendered at least once.

    • Waits until the underlying OpenLayers source reaches the ready state. If the source is already ready, the returned promise resolves immediately. If the source enters the error state, the promise is rejected.

      Returns Promise<void>

      A promise that resolves when the source state becomes ready, or rejects if the source enters the error state.

    • Utility function allowing to wait for the layer legend to be fetched.

      Parameters

      • timeout: number = 30000

        A timeout for the period to wait for. Defaults to 30,000 ms.

      Returns Promise<TypeLegend>

      A Promise that resolves when the layer legend has been fetched.

    • Utility function allowing to wait for the layer to be loaded at least once.

      Parameters

      • timeout: number = 30000

        A timeout for the period to wait for. Defaults to 30,000 ms.

      Returns Promise<boolean>

      A Promise that resolves when the layer has been loaded at least once.

    • Utility function allowing to wait for the layer to be loaded at least once.

      Parameters

      • timeout: number = 30000

        A timeout for the period to wait for. Defaults to 30,000 ms.

      Returns Promise<boolean>

      A Promise that resolves when the layer has been loaded at least once.

    • Utility function allowing to wait for the layer style to be applied.

      Parameters

      • timeout: number = 30000

        A timeout for the period to wait for. Defaults to 30,000 ms.

      Returns Promise<
          Partial<
              Record<
                  | "Point"
                  | "MultiPoint"
                  | "LineString"
                  | "MultiLineString"
                  | "Polygon"
                  | "MultiPolygon",
                  TypeLayerStyleSettings,
              >,
          >,
      >

      A Promise that resolves when the layer style has been applied.

    • Applies a view filter to a WMS or an Esri Image layer's source by updating the source parameters. This function is responsible for generating the appropriate filter expression based on the layer configuration, optional style, and time-based fragments. It ensures the filter is only applied if it has changed or needs to be reset.

      Parameters

      • layerConfig: EsriImageLayerEntryConfig | OgcWmsLayerEntryConfig

        The configuration object for the WMS or Esri Image layer.

      • source: ImageArcGISRest | ImageWMS

        The OpenLayers ImageWMS or ImageArcGISRest source instance to which the filter will be applied.

      • filter: LayerFilters | undefined

        The raw filter string input (defaults to an empty string if not provided).

      Returns void

      If the filter expression fails to parse or cannot be applied.

    • Creates a legend object based on a given GeoView layer type and style configuration. This method builds a legend representation by combining the provided style settings with the computed legend symbols retrieved from the renderer. It is asynchronous because it waits for GeoviewRenderer.getLegendStyles to generate the legend items.

      Parameters

      • schemaTag: TypeGeoviewLayerType

        The GeoView layer type identifier (e.g., vector, raster, etc.).

      • Optionalstyle: Partial<
            Record<
                | "Point"
                | "MultiPoint"
                | "LineString"
                | "MultiLineString"
                | "Polygon"
                | "MultiPolygon",
                TypeLayerStyleSettings,
            >,
        >

        Optional style configuration mapping geometry types to their style settings.

      Returns Promise<TypeLegend>

      A promise that resolves to a legend object containing:

      • type: the layer type.
      • styleConfig: the provided style configuration.
      • legend: the legend entries generated from the style.
    • Fetches feature data from a WFS GetFeature request URL (expected to return GeoJSON), parses the response into OpenLayers features, and converts them into GeoView Feature Info entries with appropriate attribute formatting. This method:

      • Performs an HTTP request to a WFS GetFeature endpoint.
      • Parses the returned GeoJSON into OL features.
      • Applies WFS/WMS configuration (schema, outfields, styles, filters).
      • Formats fields according to WFS metadata, including date parsing rules.
      • Returns an array of standardized TypeFeatureInfoEntry objects.

      Parameters

      • urlWithOutputJson: string

        The full WFS GetFeature request URL. Must specify an output format compatible with GeoJSON (e.g., outputFormat=application/json).

      • wmsLayerConfig: OgcWmsLayerEntryConfig

        The associated WMS layer configuration. Styling and filter settings from this config are applied when formatting the Feature Info results.

      • wfsLayerConfig: OgcWfsLayerEntryConfig

        The WFS layer configuration used for schema tags, outfields, metadata, and date formatting.

      • OptionalabortController: AbortController = undefined

        Optional AbortController used to cancel the fetch request.

      Returns Promise<TypeFeatureInfoResult>

      A promise of a TypeFeatureInfoResult.

      When the response is not OK (non-2xx).

      When the JSON response is empty.

      When the request exceeds the timeout duration.

      When the request was aborted by the caller's signal.

      When a network issue happened.

    • Retrieves or generates an image source (data URI or path) representing the visual style of a feature. Caches results in the imageSourceDict to avoid redundant processing.

      Parameters

      • feature: Feature

        The feature whose visual representation is to be retrieved.

      • layerStyle: TypeLayerStyleConfig

        Style configuration grouped by geometry type (e.g., Point, LineString, Polygon).

      • domainsLookup: TypeLayerMetadataFields[] | undefined

        Optional domain information for interpreting coded values.

      • aliasLookup: Record<string, string>

        A mapping of original field names to their aliases.

      • imageSourceDict: Record<string, string | undefined>

        A dictionary used to cache and reuse image sources by style key.

      Returns string | undefined

      The image source string representing the feature's style, or undefined if generation fails.

    • Formats a set of OpenLayers features into a structured array of feature info entries. Each feature is enriched with geometry, extent, field information, and optional styling.

      Parameters

      • features: Feature<Geometry>[]

        Array of OpenLayers features to process.

      • layerPath: string

        Path of the layer these features belong to.

      • schemaTag: TypeGeoviewLayerType

        The Geoview layer type for the features.

      • nameField: string | undefined

        Optional field name to use as the display name for features.

      • outFields: TypeOutfields[] | undefined

        Optional array of output fields to include in the feature info.

      • supportZoomTo: boolean

        Whether zoom-to functionality is supported for these features.

      • domainsLookup: TypeLayerMetadataFields[] | undefined

        Optional array of field metadata for domain lookups.

      • layerStyle:
            | Partial<
                Record<
                    | "Point"
                    | "MultiPoint"
                    | "LineString"
                    | "MultiLineString"
                    | "Polygon"
                    | "MultiPolygon",
                    TypeLayerStyleSettings,
                >,
            >
            | undefined

        Optional mapping of geometry type to style settings for icons.

      • OptionalinputFormat: string | string[]

        The format(s) to prioritize for string inputs. Defaults to an ISO-like format.

      • OptionalinputTimezone: string

        The timezone IANA the dates are in.

      • OptionalinputTemporalMode: TemporalMode

        When calendar, treats the input as a calendar-date-only value (no timezones). When 'instant', treats the input as moment in time (timezones aware).

      • callbackGetFieldValue: GetFieldValueDelegate

        Callback that returns the value of a field for a feature, in the correct type.

      Returns TypeFeatureInfoEntry[]

      Array of feature info entries representing each feature with enriched metadata.

      Will not throw; errors are caught and logged. Returns an empty array if processing fails.

    • Retrieves and formats the value of a field from an OpenLayers feature.

      • For date fields, the raw value (epoch ms or date string) is normalized via the date management utilities.
      • For fields with a codedValue domain, the raw code is resolved to its human-readable name. If no matching code is found, the raw value is returned.
      • For all other fields, the raw value is returned as-is.

      Parameters

      • feature: Feature

        The OpenLayers feature containing the field values.

      • fieldName: string

        The name of the field to retrieve.

      • fieldType: TypeOutfieldsType

        The data type of the field (e.g. 'string', 'number', 'date', 'oid').

      • fieldDomain: codedValueType | rangeDomainType | undefined

        Optional domain metadata. When present and of type codedValue, the raw field value is mapped to the corresponding coded-value name.

      • inputFormat: string | string[] | undefined

        Optional format(s) to prioritize when parsing date string inputs.

      • inputTimezone: string | undefined

        Optional IANA timezone to assume when interpreting date values.

      • inputTemporalMode: TemporalMode | undefined

        Optional temporal mode. 'calendar' treats dates as timezone-agnostic calendar dates; 'instant' treats them as timezone-aware moments.

      Returns unknown

      The processed field value: a formatted date for date fields, the decoded name for coded-value domains, or the raw value otherwise.

    • Initializes common properties on a layer options.

      Parameters

      • layerOptions: Options

        The layer options to initialize

      • layerConfig: AbstractBaseLayerEntryConfig

        The config to read the initial settings from

      Returns void