@geoblocks/ol-comfy

    Parent (abstract) class for a layer group. Helps to manipulate one layer group. The child class must start by setting the layerGroup.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    layerAffected: Subject<LayerAffected>

    To provide changed-like-event, without touching the original layer. With source layer uid and free reason why/by/for it's emitted. Example: emit/listen to silently set layer opacity (as reason) without touching the real layer and having to listen to every layer individually.

    layerPropertyChanged: Subject<LayerPropertyChanged>

    Event to observe layer property change in this LayerGroup without the need of having the layer itself.

    Methods

    • Add a single layer at the end of the layer group.

      Parameters

      • layer: BaseLayer

        Ol layer.

      • layerUid: string

        id of the layer.

      Returns void

    • Remove all layers from the map and clear the layer group.

      Returns void

    • Emit an "affected" layer event.

      Parameters

      • layerUid: string
      • reason: string

      Returns void

    • Emits a "LayerPropertyChanged" and call a "changed" event on the matching OL layer.

      Parameters

      • layerUid: string
      • propertyKey: string

      Returns void

    • Returns Source[]

      Every source from layers having sources in the layer group.

    • Retrieve a layer currently in the layer group.

      Parameters

      • layerUid: string

      Returns null | BaseLayer

      The matching layer or null.

    • Refresh the source of every layer with a source in the layer group.

      Returns void

    MMNEPVFCICPMFPCPTTAAATR