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

    Class AbstractBaseGVLayerAbstract

    Abstract Base GV Layer managing an OpenLayer layer, including a layer group.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    loadedOnce: boolean = false

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

    Methods

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

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

    • Returns the direct parent GVGroupLayer of this layer, if any. This method searches the provided root group layer collection to locate the group that directly contains this layer. If the layer is nested inside multiple groups, only the immediate parent group is returned.

      Parameters

      • groupLayers: GVGroupLayer[]

        The root-level group layers to search through when looking for this layer's parent.

      Returns GVGroupLayer | undefined

      The direct parent group layer, or undefined if this layer is not a child of any group.

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

      Parameters

      • groupLayers: GVGroupLayer[]

        The top-level group layers from which the layer hierarchy is searched. This must represent the root collection of the layer tree.

      Returns boolean

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

    • 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 opacity of the layer (between 0 and 1).

      Parameters

      • layerOpacity: number

        The opacity of the layer.

      • emitOpacityChange: boolean = true

        Whether to emit the event or not (false to avoid updating the legend layers)

      Returns void