@geoblocks/ol-comfy
    Preparing search index...

    LayerGroup specialized to manage layers with features (mostly vector layers). Each instance must have a unique name (the default name will be valid for the first group). The default position is 20.

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get layerAdded(): Subject<BaseLayer>

      Returns Subject<BaseLayer>

      an observables that notify addition of layer in this group.

    Methods

    • Add features in the target overlay layer. Does nothing with an empty array.

      Parameters

      • layerUid: string

        the id of the layer to add features into.

      • features: Feature<Geometry>[]

        the features to add to the layer.

      Returns void

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

      Parameters

      • layer: BaseLayer

        Ol layer.

      • layerUid: string

        id of the layer.

      Returns void

    • Emit a select feature event.

      Parameters

      • layerUid: string
      • selected: Feature<Geometry>[]
      • deselected: Feature<Geometry>[]

      Returns void

    • Parameters

      • layerUid: string

        id of the layer

      Returns null | Feature<Geometry>[]

      The cluster features in the layer or null Do not modify or save cluster features as they are recreated dynamically on each map rendering (move, zoom, etc.). It's not possible to rely on this object.

    • Parameters

      • layerUid: string

        the id of the layer to add features into.

      Returns null | VectorSource<Feature<Geometry>>

      the last vector source in the corresponding layer or null. Meaning the normal source on the vector layer with VectorSource, and the vector source inside the cluster source for ClusterSource.

    • Parameters

      • layerUid: string

        id of the layer.

      Returns null | Collection<Feature<Geometry>>

      The collections of features in the layer or null. Do not use a collection to add/remove features. It's slow. Use related methods on the source directly.

    • Returns null | Extent

      The extent (not empty) of all features in every overlay in the map.

    • Retrieve a layer currently in the layer group.

      Parameters

      • layerUid: string

      Returns null | BaseLayer

      The matching layer or null.

    • Parameters

      • layerUid: string

        the id of the layer to get the extent from.

      Returns null | Extent

      The extent (not empty) of all features in the target layer or null.

    • Get the vector layer if a vector layer with this layer id exists.

      Parameters

      • layerUid: string

        the id of the layer to add features into.

      Returns null | VectorLayer<VectorSource<Feature<Geometry>>, Feature<Geometry>>

    • Parameters

      • layerUid: string

        the id of the layer to add features into.

      Returns null | VectorSource<Feature<Geometry>>

      the vector source in the corresponding layer or null. For cluster source, the returned source is the first source (the effective cluster source, and not the vector source inside the cluster source).

    • Remove features from the target overlay layer. Does nothing with an empty array.

      Parameters

      • layerUid: string

        the id of the layer to remove features from.

      • features: Feature<Geometry>[]

        the features to remove to the layer.

      Returns void

    • Set features in the target overlay layer.

      Parameters

      • layerUid: string

        the id of the layer to remove features from.

      • features: Feature<Geometry>[]

        the features to replace existing ones in the layer.

      Returns void

    • Set a property of every given feature with the same value.

      Parameters

      • layerUid: string
      • features: Feature<Geometry>[]
      • key: string
      • value: unknown

      Returns void