Function getLayer

  • Get the OpenLayers layer instance that contains the provided Mapbox/MapLibre Style layer. Note that multiple Mapbox/MapLibre Style layers are combined in a single OpenLayers layer instance when they use the same Mapbox/MapLibre Style source.

    Parameters

    • map: Map | LayerGroup

      OpenLayers Map or LayerGroup.

    • layerId: string

      Mapbox/MapLibre Style layer id.

    Returns Layer

    OpenLayers layer instance.