source layer
A source layer is an individual layer of data within a vector source. A vector source can have multiple source layers.
A source layer differs from a style layer, which is used to add styling rules to a specific subset of data in a map style.
Find a source layer's name
There are a few places you can find the name of a source layer:
A map's style document
In a map's style document, each layer with a type of vector has a source-layer property that contains the source layer's name. The following Mapbox GL JS style layer has a source layer named waterway:
"layers": [
{
"id": "rivers",
"source": "my-source",
"source-layer": "waterway",
"type": "line",
"paint": {
"line-color": "#FFC0CB"
}
}
]
Tileset explorer
You can find a source layer's name in the Mapbox Studio Tileset explorer:
- Visit your Tilesets page.
- Click the name of one of your tilesets to open Tileset explorer.
- You will see the tileset's source layers listed under Vector layers.