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

    Class AbstractGeoViewRasterAbstract

    The AbstractGeoViewRaster class.

    Hierarchy (View Summary)

    Index
    hitTolerance: number = AbstractGeoViewLayer.DEFAULT_HIT_TOLERANCE

    The default hit tolerance

    listOfLayerEntryConfig: TypeLayerEntryConfig[] = []

    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.

    olRootLayer?: BaseLayer<{ [x: string]: any }>

    The OpenLayer root layer representing this GeoView Layer.

    DEFAULT_DISPLAY_DATE_MODE_TO_GENERATE_CONFIGS: DisplayDateMode = 'long'

    The default display date mode used when generating default configurations

    DEFAULT_HIT_TOLERANCE: number = 4

    The default hit tolerance the query should be using

    DEFAULT_WAIT_PERIOD_METADATA_WARNING: number = ...

    The default waiting time before showing a warning about the metadata taking a long time to get processed.

    DEFAULT_WAIT_PERIOD_METADATA_WARNING_RECALL: number = ...

    The interval between repeated metadata fetch warnings after the initial one has been shown.

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

      Parameters

      • displayDateMode: DisplayDateMode

        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

      Returns Promise<ConfigBaseClass[]>

      A promise that resolves with the config base classes created

    • Emits a layer-specific message event with localization support.

      Parameters

      • messageKey: string

        The key used to lookup the localized message OR message

      • messageParams: Record<string, unknown> | undefined = {}

        Optional array of parameters to be interpolated into the localized message

      • messageType: SnackbarType = 'info'

        The message type

      Returns void

      this.emitMessage(
      'layers.fetchProgress',
      ['50', '100'],
      'error',
      );
    • Fetches 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.

      Type Parameters

      • T

      Parameters

      • OptionalabortSignal: AbortSignal

        Optional AbortSignal used to cancel the metadata fetch

      Returns Promise<T>

      A promise that resolves with the parsed JSON metadata object

      When the metadata fetch fails (network, proxy, or HTTP error)

      When the response contains an ESRI error payload (propagated from throwIfMetatadaHasError())

    • Must override method to process a layer entry and return a Promise of an Open Layer Base Layer object.

      Parameters

      • layerConfig: AbstractBaseLayerEntryConfig

        Information needed to create the GeoView layer

      • displayDateMode: DisplayDateMode

        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

      Returns Promise<AbstractBaseLayerEntryConfig>

      A promise that resolves once the config metadata has been processed