Function getStyleForLayer

  • Get the the style for a specific Mapbox layer only. This can be useful for creating a legend.

    Parameters

    • feature: RenderFeature | Feature

      OpenLayers feature.

    • resolution: number

      View resolution.

    • olLayer: VectorLayer<any> | VectorTileLayer<any>

      OpenLayers layer.

    • layerId: string

      Id of the Mapbox layer to get the style for

    Returns Style[]

    Styles for the provided Mapbox layer.