Glossary

source layer

A source layer is an individual layer of data within a vector source. A vector source can have multiple layers.

Although it has a similar name, a source layer is different from a style layer, which is used to add styling rules to a specific subset of data in a map style.

There are a few places you can find the name of a source layer:

  • In the source-layer property of a map's style document.
  • In the Mapbox Studio tileset information page for a specific tileset.
  • In the Mapbox Studio style editor using the Select data tab.
  • In the Mapbox Studio style editor using the Layer overview option in the top toolbar's Settings tab.

A map's style document

The following Mapbox GL JS style layer has a source layer of waterway:

"layers": [
  {
    "id": "rivers",
    "source": "my-source",
    "source-layer": "waterway",
    "type": "line",
    "paint": {
      "line-color": "#FFC0CB"
    }
  }
]

Tileset information page

To find a source layer within a tileset:

  1. Visit your Tilesets page.
  2. Click the name of one of your tilesets.
  3. The tileset information page will open, and you can find your source layers below the Layer details heading.

Select data in the Mapbox Studio style editor

To find the name of source layers used in Mapbox styles:

  1. Open the style in the Mapbox Studio style editor.
  2. Click on the name of the layer in the layer list.
  3. Switch to the Select data tab.
  4. Find the source layer listed below the name of the tileset source.

Layer overview in the Mapbox Studio style editor

To find the name of source layers used in Mapbox styles:

  1. Open the style in the Mapbox Studio style editor.
  2. Click on the Settings button in the top toolbar.
  3. Scroll down to Layer overview section.

Related resources:

Was this page helpful?