Constructs a GVGeoTIFF layer to manage an OpenLayer layer.
The OpenLayer source
The layer configuration
Indicates if the layer has become in loaded status at least once already
Counts the number of times the loading happened.
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
Static ReadonlyDEFAULT_The default hit tolerance the query should be using
Static ReadonlyDEFAULT_The default loading period before we show a message to the user about a layer taking a long time to render on map
ProtectedemitEmits filter applied event.
The event to emit
ProtectedemitEmits a layer-specific message event with localization support.
The key used to lookup the localized message OR message
Array of parameters to be interpolated into the localized message
The message type
Optional whether to show this as a notification. Defaults to false
ProtectedformatFormats a list of features into an array of TypeFeatureInfoEntry, including icons, field values, domains, and metadata.
Array of features to format
Configuration of the associated layer
Optional date format used by the service
Optional IANA time zone identifier used by the service
Optional temporal mode for date handling
An array of TypeFeatureInfoEntry objects
ProtectedgetOverridable function to get all feature information for all the features stored in the layer.
The Map so that we can grab the resolution/projection we want to get features on
The layer filters to apply when querying the features
OptionalabortController: AbortControllerOptional AbortController to cancel the operation
A promise that resolves with the feature info result
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.
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.
The projection to get the bounds into
The number of stops to use to generate the extent
A promise that resolves with the layer bounding box or undefined when not found
A quick getter to help identify which layer class the current instance is coming from.
The name of the class
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.
The layer extent.
Gets the extent of an array of features.
The IDs of the features to calculate the extent from.
The output projection for the extent.
Optionaloutfield: stringOptional. ID field to return for services that require a value in outfields.
A promise that resolves to the extent of the features, if available.
Returns feature information for the layer specified.
The Map to get feature info from
The type of query to perform
A pixel, coordinate or polygon that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
ProtectedgetOverridable function to return of feature information at a given coordinate.
The Map where to get Feature Info At Coordinate from
The coordinate that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
ProtectedgetOverridable function to return of feature information at the provided long lat coordinate.
The Map where to get Feature Info At LonLat from
The coordinate that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
ProtectedgetOverridable function to return of feature information at a given pixel location.
The Map where to get Feature Info At Pixel from
The pixel coordinate that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
ProtectedgetOverridable function to return of feature information at the provided bounding box.
The Map where to get Feature using BBox from
The bounding box that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
ProtectedgetOverridable function to return of feature information at the provided polygon.
The Map where to get Feature Info using Polygon from
The polygon that will be used by the query
Whether to include geometry in the query, default is true
Optional AbortController to cancel the operation
A promise that resolves with the feature info result
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).
A filter expression string if one can be derived from the style,
or undefined if no filter applies.
Gets the Geoview layer id.
The geoview layer id
Gets the geoview layer name.
The layer name
Gets the hit tolerance associated with the layer.
The hit tolerance
Indicates if the layer is currently hoverable.
The currently hoverable flag.
Gets the in visible range value.
Optional. The map current zoom
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.
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).
The strongly-typed layer configuration specific to this layer.
Gets the layer filters associated to the layer.
The filter associated to the layer or undefined.
Gets the layer name or falls back on the layer name in the layer configuration.
The layer name
Gets the layer path associated with the layer.
The layer path
Gets the layer status
The layer status
Gets the max zoom of the layer.
The max zoom of the layer.
Gets the min zoom of the layer.
The min zoom of the layer.
Overrides the parent method to return a more specific OpenLayers layer type (covariant return).
The strongly-typed OpenLayers type.
Overrides the parent class's method to return a more specific OpenLayers source type (covariant return).
The GeoTIFF source instance associated with this layer.
Gets the opacity of the layer (between 0 and 1).
The opacity of the layer.
Returns the direct parent GVGroupLayer of this layer, if any.
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.
The direct parent group layer, or undefined if this layer is not
contained within any group.
Returns the top-most (root) GVGroupLayer ancestor of this layer, if any.
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).
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.
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.
Indicates if the layer is currently queryable.
The currently queryable flag.
Gets the layer style.
The layer style
Gets the style item visibility on the layer.
The style item to toggle visibility on
The visibility of the style item
Gets the temporal dimension that is associated to the layer.
The temporal dimension associated to the layer or undefined.
Gets the visibility of the layer (true or false).
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:
false immediately if any parent is not visible.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.
Checks if layer is visible at the given zoom level.
Zoom level to be compared
If the layer is visible at this zoom level
Unregisters when a layer is turning into a error stage event handler.
The callback to stop being called whenever the event is emitted
Unregisters a filter applied event handler.
The callback to stop being called whenever the event is emitted
Unregisters when a layer have been first loaded on the map event handler.
The callback to stop being called whenever the event is emitted
Unregisters an hoverable changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer item visibility changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters when a layer is turning into a loaded stage event handler.
The callback to stop being called whenever the event is emitted
Unregisters when a layer is turning into a loading stage event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer message event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer name changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters an opacity changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters an queryable changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer style changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a visible changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a z-index changed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a legend queried event handler.
The callback to stop being called whenever the event is emitted
Unregisters a legend querying event handler.
The callback to stop being called whenever the event is emitted
ProtectedonOverridable method called when the layer is in error and couldn't be loaded correctly.
The error which is being raised
ProtectedonOverridable method called to get a more specific error code for all errors.
The event which is being triggered
A LayerFailedToLoadError error
Overrides the fetching of the legend for a geotiff layer.
A promise that resolves with the legend of the layer or null
Overrides the way the attributions are retrieved.
The layer attributions
Overrides the way to get the bounds for this layer type.
The projection to get the bounds into
The number of stops to use to generate the extent
A promise that resolves with the layer bounding box or undefined when not found
ProtectedonOverridable function that gets the extent of an array of features.
The IDs of the features to calculate the extent from
The output projection for the extent
Optionaloutfield: stringOptional ID field to return for services that require a value in outfields
A promise that resolves with the extent of the features
ProtectedonOverridable method called when the layer image is in error and couldn't be loaded correctly.
The error which is being raised
ProtectedonOverridable method called to get a more specific error code for image load errors.
The event which is being triggered
A LayerImageFailedToLoadError error
Registers when a layer is turning into a error stage event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a filter applied event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers when a layer have been first loaded on the map event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers an hoverable changed event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a layer item visibility toggled event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers when a layer is turning into a loaded stage event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers when a layer is turning into a loading stage event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a layer message event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a layer name changed event handler.
The callback to be executed whenever the event is emitted
The registered callback, which can be used to unregister the event handler later
Registers an opacity changed event handler.
The callback to be executed whenever the event is emitted
The registered callback, which can be used to unregister the event handler later
Registers an queryable changed event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a layer style changed event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a visible changed event handler.
The callback to be executed whenever the event is emitted
The registered callback, which can be used to unregister the event handler later
Registers a z-index changed event handler.
The callback to be executed whenever the event is emitted
The registered callback, which can be used to unregister the event handler later
Registers a legend queried event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
Registers a legend querying event handler.
The callback to be executed whenever the event is emitted
The registered callback for potential unregistration
ProtectedonOverridable method called when the layer has been loaded correctly.
ProtectedonOverridable method called when the layer has started to load itself on the map.
Overrides the refresh function to refresh the layer source.
Optional projection to refresh to
ProtectedonOverridable function to apply a view filter on the current layer.
Optionalfilter: LayerFiltersOptional elaborate layer filters to be used
ProtectedonOverridable 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.
The desired opacity for the layer, typically between 0 (fully transparent)
and 1 (fully opaque).
Optional, whether to emit a layer opacity changed event after updating the opacity. Defaults to true.
Overridable function set the style according to the fetched legend information.
The fetched legend information
ProtectedonOverridable method to set the visibility of the layer.
The desired visibility for the layer.
ProtectedonOverridable method to set the z-index of the layer.
The desired z-index for the layer.
Optional, whether to emit a z-index changed event after updating the z-index. Defaults to true.
Queries the legend.
This function raises legend querying and queried events. It calls the overridable onFetchLegend() function.
A promise that resolves with the legend or null
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.
Optional projection to refresh to
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].
The extent to assign to the layer.
Sets if the layer is currently hoverable.
The hoverable value.
Sets the layer filters associated to the layer.
The filter layers associated to the layer or undefined
Whether to refresh the layer after setting filters
Applies a time filter on a date range.
The start date
The end date
Sets the layer name
The layer name
Sets the legend associated with the layer.
The layer legend
Sets the max zoom of the layer.
The max zoom of the layer.
Sets the min zoom of the layer.
The min zoom of the layer.
ProtectedsetSets the OpenLayers Layer
The OpenLayers Layer
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.
The desired opacity for the layer, typically between 0 (fully transparent)
and 1 (fully opaque).
Optional, whether to emit a layer opacity change event after updating the opacity. Defaults to true.
Sets the parent layer
The parent layer for the current layer if any.
Sets if the layer is currently queryable.
The queryable value.
Sets the layer style.
The layer style
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.
The legend/style item whose visibility will be updated
Whether the style item should be visible
When true, waits for the next layer render to complete before resolving
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).
The visibility of the layer.
Sets the z-index of the layer.
The z-index of the layer.
Optional, whether to emit a z-index changed event after updating the z-index. Defaults to true.
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.
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.
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.
A timeout for the period to wait for. Defaults to 30,000 ms
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.
A timeout for the period to wait for. Defaults to 30,000 ms
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.
A timeout for the period to wait for. Defaults to 30,000 ms
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.
A timeout for the period to wait for. Defaults to 30,000 ms
A promise that resolves when the layer style has been applied
StaticcreateCreates 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.
The GeoView layer type identifier (e.g., vector, raster, etc.)
Optional style configuration mapping geometry types to their style settings
A promise that resolves with a legend object containing type, styleConfig, and legend entries
StaticgetRetrieves 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.
The feature whose visual representation is to be retrieved
Style configuration grouped by geometry type (e.g., Point, LineString, Polygon)
Optional domain information for interpreting coded values
A mapping of original field names to their aliases
A dictionary used to cache and reuse image sources by style key
The image source string representing the feature's style, or undefined when generation fails
StaticgetRecursively searches the layer tree to find the parent GVGroupLayer of a given layer.
The search begins from the provided list of layers, which should represent the root-level layer collection. This method walks top-down through all nested GVGroupLayers until it finds the group whose children contain the specified layer. It proceeds this way, because OpenLayers doesn't have a way to start from a leaf - have to start from the root.
The layer for which the parent group is being searched.
The list of layers to search within. Typically this is the root layer group of the map.
The parent group layer if found,
otherwise undefined if the layer has no parent.
StatichelperFormats 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. Will not throw; errors are caught and logged. Returns an empty array if processing fails.
Array of OpenLayers features to process
Path of the layer these features belong to
The Geoview layer type for the features
Optional field name to use as the display name for features
Optional array of output fields to include in the feature info
Whether zoom-to functionality is supported for these features
Optional array of field metadata for domain lookups
Optional mapping of geometry type to style settings for icons
Optional format(s) to prioritize for string inputs
Optional IANA timezone the dates are in
Optional temporal mode for date handling
Callback that returns the value of a field for a feature, in the correct type
Array of feature info entries representing each feature with enriched metadata
StatichelperRetrieves and formats the value of a field from an OpenLayers feature.
date fields, the raw value (epoch ms or date string) is normalized
via the date management utilities.codedValue domain, the raw code is resolved to its
human-readable name. If no matching code is found, the raw value is returned.The OpenLayers feature containing the field values.
The name of the field to retrieve.
The data type of the field (e.g. 'string', 'number', 'date', 'oid').
Optional domain metadata. When present and of type codedValue,
the raw field value is mapped to the corresponding coded-value name.
Optional format(s) to prioritize when parsing date string inputs.
Optional IANA timezone to assume when interpreting date values.
Optional temporal mode. 'calendar' treats dates as
timezone-agnostic calendar dates; 'instant' treats them as timezone-aware moments.
The processed field value: a formatted date for date fields, the decoded name for coded-value domains, or the raw value otherwise.
Protected StaticinitInitializes common properties on a layer options.
The layer options to initialize
The config to read the initial settings from
Manages a GeoTIFF layer.