Function addMapboxLayer

  • Add a new Mapbox Layer object to the style. The map will be re-rendered.

    Parameters

    • mapOrGroup: Map | LayerGroup

      The Map or LayerGroup apply was called on.

    • mapboxLayer: any

      Mapbox Layer object.

    • OptionalbeforeLayerId: string

      Optional id of the Mapbox Layer before the new layer that will be added.

    Returns Promise<void>

    Resolves when the added layer is available.