AbstractConstructor
The GeoView layer configuration options.
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 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 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_Static ReadonlyNAME_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.
OptionalmapProjection: ProjectionThe map projection.
OptionalabortSignal: AbortSignalAbort signal to handle cancelling of the process.
A promise of 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
ProtectedemitProtectedEmits 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
Optionalnotification: boolean = falseWhether to show this as a notification. Defaults to false
Fetches the metadata by calling onFetchServiceMetadata.
OptionalabortSignal: AbortSignalAbort signal to handle cancelling of the process.
Returns a Promise of a 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.
Gets the Geoview layer id.
The geoview layer id
Gets the Geoview layer id.
The geoview layer id
Returns the display name of the GeoView layer, if defined.
The GeoView layer name.
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.
Overridable method to get the metadata. Override this function to return the more precise type (covariant return).
Gets the metadata access path if it exists.
The trimmed metadata access path, or undefined if not defined.
Gets the current server date fragments order. The date fragments order describes how date components (e.g. day, month, year, time fragments) are arranged in server-provided date strings.
The server date fragments order,
or undefined if it has not been initialized.
Indicates if the metadata access path is defined in the config.
True if the configuration has a metadata access path.
Initializes the layer entries based on the GeoviewLayerConfig that was initially provided in the constructor.
A promise resolved once the layer entries have been initialized.
Initializes the server date fragments order from a service date format string. If the date fragments order has not already been set, this method derives it from the provided date format using DateMgt.getDateFragmentsOrder and stores it for later use.
OptionaldateFormat: string = 'DD/MM/YYYY HH:MM:SSZ'The date format string provided by the service, used to determine the order of date fragments.
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 config 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
Protected AbstractonMust override method to create a GV Layer from a layer configuration.
Information needed to create the GeoView layer.
The GV Layer that has been created.
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.
Protected AbstractonProtectedMustoverride function to load vector features for a layer during vector source creation. This abstract method defines the contract for retrieving and converting raw vector data into OpenLayers Feature instances. Concrete subclasses must implement the logic required to fetch data from the underlying service (e.g. WFS, GeoJSON, CSV) and transform it into features compatible with the vector source. The returned features are typically added to the vector source as part of its initialization or loading lifecycle.
The configuration object describing the vector layer, including its data source and access parameters.
The OpenLayers vector source options associated with the layer. This may be used by implementations to customize loading behavior or source configuration.
Options controlling how features are read, including the target
featureProjection.
A promise that resolves to an array of OpenLayers features created from the underlying data source.
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.
A promise with the metadata or undefined when no metadata for the particular layer type.
Protected AbstractonMust override method to initialize a layer entry based on a GeoView layer config.
A promise resolved 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 config 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
Protected AbstractonMust override method to process a layer entry and return a Promise of an Open Layer Base Layer object.
Information needed to create the GeoView layer.
OptionalmapProjection: ProjectionThe map projection.
OptionalabortSignal: AbortSignalAbort signal to handle cancelling of the process.
The Promise that the config metadata has been 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.
The Open Layer Base Layer that has been created.
ProtectedonOverridable method to validate the configuration of the layer entries to ensure that each layer is correctly defined.
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 metadata access path used by this GeoView layer.
The metadata access path to set.
Sets the server date fragments order. This value is typically derived from a service date format and cached for reuse when parsing or formatting server dates.
The date fragments order to store. Use undefined to reset the value.
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.
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: TypePostSettingsThe possible POST settings from the layer config.
A promise that resolves to the fetched text response.
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: TypePostSettingsThe possible POST settings from the layer config.
A promise that resolves to the fetched text response.
Protected StaticprocessProtectedProcesses a Layer Config by calling 'createGeoViewLayers' on the provided layer.
The layer to use to process the configuration
The promise of a generated ConfigBaseClass.
The AbstractGeoViewVector class.