Constructs a WFS Layer configuration processor.
The layer configuration
The default hit tolerance
An array of layer settings. In the schema, this attribute is optional. However, we define it as mandatory and if the configuration does not provide a value, we use an empty array instead of an undefined attribute.
OptionalolThe OpenLayer root layer representing this GeoView Layer.
Static ReadonlyDEFAULT_The default display date mode used when generating default configurations
Static ReadonlyDEFAULT_The default hit tolerance the query should be using
Static ReadonlyDEFAULT_The default waiting time before showing a warning about the metadata taking a long time to get processed.
Static ReadonlyDEFAULT_The interval between repeated metadata fetch warnings after the initial one has been shown.
Static ReadonlyDEFAULT_The maximum delay to wait before we warn about the features fetch taking a long time
Static ReadonlyEXCLUDED_Static ReadonlyEXCLUDED_Static ReadonlyEXCLUDED_Static ReadonlyEXCLUDED_Static ReadonlyEXCLUDED_Static ReadonlyMAX_Adds a GeoViewLayerLoadedFailedError in the internal list of errors for a layer being loaded. It also sets the layer status to error.
The error
Optional layer config
Recursively processes the list of layer entries to see if all of them are greater than or equal to the provided layer status.
The layer status to compare with the internal value of the config
true when all layers are greater than or equal to the layerStatus parameter
This method is used to create the layers specified in the listOfLayerEntryConfig attribute inherited from its parent.
Normally, it is the second method called in the life cycle of a GeoView layer, the first one being the constructor. Its code is the same for all child classes. It must first validate that the olLayers attribute is null indicating that the method has never been called before for this layer. If this is not the case, an error message must be sent. Then, it calls the abstract method getAdditionalServiceDefinition. For example, when the child is a WFS service, this method executes the GetCapabilities request and saves the result in the metadata attribute of the class. It also process the layer's metadata for each layer in the listOfLayerEntryConfig tree in order to define the missing pieces of the layer's configuration. Layer's configuration can come from the configuration of the GeoView layer or from the information saved by the method #processListOfLayerMetadata, priority being given to the first of the two. When the GeoView layer does not have a service definition, the getAdditionalServiceDefinition method does nothing.
Finally, the processListOfLayerEntryConfig is called to instantiate each layer identified by the listOfLayerEntryConfig attribute. This method will also register the layers to all layer sets that offer this possibility. For example, if a layer is queryable, it will subscribe to the details-panel and every time the user clicks on the map, the panel will ask the layer to return the descriptive information of all the features in a tolerance radius. This information will be used to populate the details-panel.
The display date mode to use for processing time dimensions in the metadata
OptionalmapProjection: Projection
Optional map projection
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves with the config base classes created
Creates a GV Layer from a layer configuration.
Information needed to create the GeoView layer
The GV Layer that has been created
Creates a VectorSource from a layer config.
Configuration object for the vector tile layer
An initialized VectorSource ready for use in a layer
ProtectedemitEmits an event to all handlers.
The event to emit
ProtectedemitEmits a layer-specific message event with localization support.
The key used to lookup the localized message OR message
Optional array of parameters to be interpolated into the localized message
The message type
Fetches the metadata by calling onFetchServiceMetadata.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves with the metadata
ProtectedfetchFetches metadata for the vector layer.
OptionalabortSignal: AbortSignalA promise that resolves to the metadata or undefined if not available
ProtectedfetchFetches the WFS service metadata.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the fetch process
A promise that resolves with the WFS metadata
Recursively gets all layer entry configs in the GeoView Layer.
The list of layer entry configs
A quick getter to help identify which layer class the current instance is coming from.
The name of the class of the current instance
Gets the proxy URL from the map-level service URLs configuration.
The proxy URL, or undefined if not configured
Gets the map-level service URLs configuration for this layer's map instance.
The service URLs configuration, or undefined if not set
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 Geoview layer id.
The geoview layer id
Returns the display name of the GeoView layer, if defined.
The GeoView layer name
Indicates whether the layer is using a proxy to connect to its service. GV Not to be confused with the layer entry config function of the same name.
true if the layer is using a proxy; otherwise, false
Gets the first layer entry name if any sub-layers exist or else gets the geoviewLayerName or even the geoviewLayerId.
The layer entry name if any sub-layers exist or the geoviewLayerName or even the geoviewLayerId
Gets the list of errors accumulated during layer loading.
A shallow copy of the layer load error list
Overrides the parent class's getter to provide a more specific return type (covariant return).
The strongly-typed metadata specific to this layer
Gets the metadata access path if it exists.
The trimmed metadata access path, or undefined if not defined
Gets the proxy URL used for the layer's processing. GV Not to be confused with the layer entry config function of the same name.
The proxy URL, or undefined if no proxy is being used
Prepends the proxy URL to the given URL when the layer is configured to use a proxy.
The URL to optionally prepend the proxy to
The URL with proxy prefix if using a proxy, or the original URL as-is
Indicates if the metadata access path is defined in the config.
True if the configuration has a metadata access path
ProtectedhelperFetches and validates service metadata for layers that use the ?f=json convention.
This helper builds the metadata URL by appending ?f=json to the metadataAccessPath, then fetches it
using GeoUtilities.fetchJsonWithProxyFallback. If the initial request fails with a network error, the
fallback automatically retries through the configured proxy. When a proxy is used successfully, it is
stored on the GeoView layer instance via setProxyUrl so that subsequent requests (legend, identify,
layer metadata) can reuse it.
After a successful fetch, the response is validated via throwIfMetatadaHasError to detect ESRI-level
error payloads (e.g., { error: { code, message } }) embedded in an otherwise successful HTTP response.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the metadata fetch
A promise that resolves with the parsed JSON metadata object
Initializes the layer entries based on the GeoviewLayerConfig that was initially provided in the constructor.
A promise that resolves once the layer entries have been initialized
Unregisters a config created event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer entry config processed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer entry config processed event handler.
The callback to stop being called whenever the event is emitted
Unregisters a layer creation event handler.
The callback to stop being called whenever the event is emitted
Unregisters a GV layer created 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
ProtectedonOverrides the creation of the GV Layer.
The layer entry configuration
The GV Layer
ProtectedonOverridable function to create a source configuration for the vector layer.
The layer entry configuration
The source options (default: { strategy: all })
The source configuration that will be used to create the vector layer
ProtectedonOverrides the loading of the vector features for the layer by fetching WFS data and converting it into OpenLayers Feature feature instances.
The configuration object for the vector layer, containing source and data access information
The OpenLayers vector source options associated with the layer
Options controlling how features are read, including the target featureProjection
A promise that resolves to an array of OpenLayers features
ProtectedonOverrides the way the metadata is fetched.
Resolves with the Json object or undefined when no metadata is to be expected for a particular layer type.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves with the metadata or undefined when no metadata for the particular layer type
ProtectedonOverridable function to perform additional initialization on the created GV Layer.
The GV layer to initialize
ProtectedonOverrides the way a geoview layer config initializes its layer entries.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves once the layer entries have been initialized
Registers a config created event handler.
The callback to be executed whenever the event is emitted
Registers a layer entry config processed event handler.
The callback to be executed whenever the event is emitted
Registers a layer entry config processed event handler.
The callback to be executed whenever the event is emitted
Registers a layer creation event handler.
The callback to be executed whenever the event is emitted
Registers a GV layer created event handler.
The callback to be executed whenever the event is emitted
Registers a layer message event handler.
The callback to be executed whenever the event is emitted
ProtectedonOverrides the way the layer metadata is processed.
The layer entry configuration to process
The display date mode to use for processing time dimensions in the metadata
OptionalmapProjection: Projection
Optional map projection
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves once the layer entry configuration has gotten its metadata processed
ProtectedonOverridable method to process a layer entry and return a Promise of an Open Layer Base Layer object.
Information needed to create the GeoView layer
A promise that resolves with the Geoview Layer that has been created
ProtectedonOverrides the validation of a layer entry config.
The layer entry config to validate
ProtectedonOverridable method to validate the configuration of the layer entries to ensure that each layer is correctly defined.
The list of layer entries configuration to validate
Sets the proxy URL in the map-level service URLs configuration.
The proxy URL to set, or undefined to clear it
Sets the map-level service URLs configuration for this layer's map instance.
The service URLs configuration from the map features config
Sets the metadata access path used by this GeoView layer.
The metadata access path to set
Sets the proxy URL to be used for the layer's processing. GV Not to be confused with the layer entry config function of the same name.
The proxy URL to set
Validates the configuration of the layer entries to ensure that each layer is correctly defined.
The layer entry config to validate
Recursively validates the configuration of the layer entries to ensure that each layer is correctly defined.
The list of layer entries configuration to validate
StaticcreateCreates a configuration object for an WFS Feature layer.
This function constructs a TypeWFSLayerConfig object that describes an WFS Feature layer
and its associated entry configurations based on the provided parameters.
A unique identifier for the GeoView layer
The display name of the GeoView layer
The full service URL to the layer endpoint
Indicates whether the layer supports time-based filtering
Indicates the strategy to use to fetch vector data
An array of layer entries objects to be included in the configuration
The constructed configuration object for the WFS Feature layer
StaticextractExtracts the preferred output format value for a WFS DescribeFeatureType operation from the parsed WFS capabilities metadata.
The method navigates through the ows:OperationsMetadata section of the capabilities
document to locate the "DescribeFeatureType" operation and returns the first available
output format value.
The parsed WFS capabilities metadata object
The detected output format string for the DescribeFeatureType operation, or an empty string if no suitable value is found
StaticfetchFetches json data from the given URL using settings defined in the vector source configuration.
Supports both GET and POST requests depending on the presence of postSettings.
The URL to fetch data from
OptionalpostSettings: TypePostSettings
Optional POST settings from the layer config
A promise that resolves to the fetched JSON response
StaticfetchFetches the metadata for a typical WFS class.
The url to query the metadata from
Proxy URL to use when necessary
OptionalcallbackNewMetadataUrl: CallbackNewMetadataDelegate
Optional callback executed when a proxy had to be used to fetch the metadata.
OptionalabortSignal: AbortSignal
Optional AbortSignal used to cancel the layer creation process
A promise that resolves with the metadata when fetched or undefined when capabilities weren't found
StaticfetchFetches text data from the given URL using settings defined in the vector source configuration.
Supports both GET and POST requests depending on the presence of postSettings.
The URL to fetch data from
OptionalpostSettings: TypePostSettings
Optional POST settings from the layer config
A promise that resolves to the fetched text response
StaticfetchGeneric format fallback strategy: tries the preferred format first, then falls back to no specific format. Accepts custom parse functions so callers can plug in their own fetch+parse pipeline.
The WFS layer entry configuration
OptionalbboxExtent: string
Optional bbox extent string (e.g., 'minx,miny,maxx,maxy,EPSG:3978')
Optionaloutfields: TypeOutfields[]
Optional list of fields to return (propertyName parameter)
Optionalfilter: string
Optional OGC XML filter string
OptionalsrsName: string
Optional output projection code (e.g., 'EPSG:3857')
A promise that resolves with the result of the parse function
StaticgetDetermines the simplified data type of a specified field from a WFS layer configuration.
Extracts the field definition from the layer's metadata, interprets its WFS type
(e.g., xsd:int, xsd:date), and maps it to a normalized internal type
('string', 'number', 'date', or 'dateTime').
The name of the field whose type should be retrieved
The WFS layer configuration containing metadata definitions
The normalized field type ('string', 'number', 'date', or 'dateTime')
StaticinitInitializes a GeoView layer configuration for a WFS layer.
This method creates a basic TypeGeoviewLayerConfig using the provided
ID, name, and metadata access path URL. It then initializes the layer entries by calling
initGeoViewLayerEntries, which may involve fetching metadata or sublayer info.
A unique identifier for the layer
The display name of the layer
The full service URL to the layer endpoint
OptionalisTimeAware: boolean
Optional to indicates whether the layer supports time-based filtering
A promise that resolves to an initialized GeoView layer configuration with layer entries
StaticinitInitializes the layer metadata for a WFS layer entry configuration based on the provided feature type properties.
This method processes the list of feature type properties obtained from a DescribeFeatureType response, identifies geometry fields, and sets the appropriate metadata on the layer configuration.
The vector layer entry to configure
An array of field names and its aliases
StaticisDetermines whether a given WFS feature type field represents a geometry property.
Checks if the field's type string starts with the "gml:" prefix, which indicates
a GML geometry type such as gml:PointPropertyType, gml:PolygonPropertyType, etc.
The feature type field definition to evaluate
true if the field is a geometry field; otherwise, false
Protected StaticprocessProcesses a Layer Config by calling 'createGeoViewLayers' on the provided layer.
The layer to use to process the configuration
A promise that resolves with the generated ConfigBaseClass array
Protected StaticprocessThis method sets the outfields and aliasFields of the source feature info.
An array of field names
The first row of data
The headers to exclude from feature info
The vector layer entry to configure
StaticprocessProcesses a WFS (Web Feature Service) GeoviewLayerConfig and returns a promise
that resolves to an array of ConfigBaseClass layer entry configurations.
This method:
The unique identifier for the GeoView layer
The display name for the GeoView layer
The URL of the service endpoint
Proxy URL to use when necessary
An array of layer IDs to include in the configuration
Indicates if the layer is time aware
The strategy to use for fetching vector data
Indicates whether to fetch styles from WMS
OptionalcallbackCreateLayerEntryConfig: (wfsEntry: TypeLayerEntryShell) => TypeLayerEntryShell
Optional callback to customize each layer entry configuration
A promise that resolves to an array of layer configurations
StaticthrowThrows a LayerServiceMetadataUnableToFetchError if the provided metadata has an error in its content.
The geoview layer id
The layer name
The metadata to check
A class to add WFS layer.