@terrestris/ol-util
    Preparing search index...

    Helper class for some operations related to permalink function.

    Index

    Constructors

    Methods

    • Applies an existing permalink to the given map.

      Parameters

      • map: Map

        The OpenLayers map.

      • separator: string = ';'

        The separator of the layers list and center coordinates in the link. Default is to ';'.

      • identifier: (layer: BaseLayer) => string = ...

        Function to generate the identifier of the layer in the link. Default is the name (given by the associated property) of the layer.

      • filter: (layer: BaseLayer) => layer is TileLayer<any> | ImageLayer<any> = ...

        Function to filter layers that should be handled by the link. Default is to consider all current map layers of type ol/layer/Tile.

      Returns null | string

      The customLayerAttributes, if defined. Otherwise null.

    • Creates a permalink based on the given map state. It will contain the current view state of the map (center and zoom) as well as the current (filtered) list of layers.

      Parameters

      • map: Map

        The OpenLayers map

      • separator: string = ';'

        The separator for the layers list and center coordinates in the link. Default is to ';'.

      • identifier: (l: BaseLayer) => any = ...

        Function to generate the identifier of the layer in the link. Default is the name (given by the associated property) of the layer.

      • filter: (l: BaseLayer) => boolean = ...

        Function to filter layers that should be added to the link. Default is to add all visible layers of type ol/layer/Tile.

      • customAttributes: string[] = []

        Custom layer attributes which will be saved in the permalink for each layer.

      Returns string

      The permalink.

    • Search through the given Ol-Collection for the given id and set all parenting groups visible.

      Parameters

      • map: Map

        The openlayers map

      • coll: Collection<BaseLayer>

        The Openlayers Collection

      • id: string

        Ther layer ol uid to search for

      Returns void