Open Pioneer Trails Packages
    Preparing search index...

    Interface AnyLayerBaseType<AdditionalEvents>

    Interface shared by all layer types (operational layers and sublayers).

    Instances of this interface cannot be constructed directly; use a real layer class such as SimpleLayer instead.

    interface AnyLayerBaseType<AdditionalEvents = {}> {
        attributes: Readonly<Record<string | symbol, unknown>>;
        children: undefined | ChildrenCollection<AnyLayer>;
        description: string;
        id: string;
        internal: boolean;
        layers: undefined | GroupLayerCollection;
        legend: undefined | string;
        map: MapModel;
        parent: undefined | AnyLayer;
        sublayers: undefined | SublayersCollection<WMSSublayer>;
        title: string;
        type: "simple" | "wms" | "wmts" | "group" | "wms-sublayer";
        visible: boolean;
        deleteAttribute(deleteAttribute: string | symbol): void;
        setDescription(newDescription: string): void;
        setInternal(newIsInternal: boolean): void;
        setTitle(newTitle: string): void;
        setVisible(newVisibility: boolean): void;
        updateAttributes(newAttributes: Record<string | symbol, unknown>): void;
    }

    Type Parameters

    • AdditionalEvents = {}

    Hierarchy (View Summary)

    Index

    Properties

    attributes: Readonly<Record<string | symbol, unknown>>

    Additional attributes associated with this layer.

    children: undefined | ChildrenCollection<AnyLayer>

    The direct children of this layer.

    The children may either be a set of operational layers (e.g. for a group layer) or a set of sublayers, or undefined.

    See also layers and sublayers.

    description: string

    The human-readable description of this layer. May be empty.

    id: string

    The unique id of this layer within its map model.

    NOTE: layer ids may not be globally unique: layers that belong to different map models may have the same id.

    internal: boolean

    Property that specifies if the layer is an "internal" layer. Internal layers are not considered by any UI widget (e.g. Toc or Legend). The internal state is independent of the layer's visibility which is determined by visible

    NOTE: Some UI widgets might use component specific attributes or props that have precedence over the internal property.

    layers: undefined | GroupLayerCollection

    If this layer is a group layer this property contains a collection of all layers that a members to the group.

    The property shall be undefined if it is not a group layer.

    The properties layers and sublayers are mutually exclusive.

    legend: undefined | string

    Legend URL from the service capabilities, if available.

    Note: this property may be expanded upon in the future, e.g. to support more variants than just image URLs.

    The map this layer belongs to.

    parent: undefined | AnyLayer

    The direct parent of this layer instance, used for sublayers or for layers in a group layer.

    The property shall be undefined if the layer is not a sublayer or member of a group layer.

    sublayers: undefined | SublayersCollection<WMSSublayer>

    The collection of child sublayers for this layer. Sublayers are layers that cannot exist without an appropriate parent layer.

    Layers that can never have any sublayers may not have a sublayers collection.

    The properties layers and sublayers are mutually exclusive.

    title: string

    The human-readable title of this layer.

    type: "simple" | "wms" | "wmts" | "group" | "wms-sublayer"

    Identifies the type of this layer.

    visible: boolean

    Whether the layer is visible or not.

    NOTE: The model's visible state may do more than influence the raw OpenLayers's visibility property. Future versions may completely remove invisible layers from the OpenLayer's map under some circumstances.

    Methods

    • Deletes the attribute of this layer.

      Parameters

      • deleteAttribute: string | symbol

      Returns void

    • Updates the description of this layer.

      Parameters

      • newDescription: string

      Returns void

    • Updates the internal property of this layer to the new value.

      Parameters

      • newIsInternal: boolean

      Returns void

    • Updates the title of this layer.

      Parameters

      • newTitle: string

      Returns void

    • Updates the visibility of this layer to the new value.

      NOTE: The visibility of base layers cannot be changed through this method. Call LayerCollection.activateBaseLayer instead.

      Parameters

      • newVisibility: boolean

      Returns void

    • Updates the attributes of this layer. Values in newAttributes are merged into the existing ones (i.e. via Object.assign).

      Parameters

      • newAttributes: Record<string | symbol, unknown>

      Returns void