source layer | Help (original) (raw)
On this page
Additional Developer Resources
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
:
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 menu Vector layers.
Mapbox Studio style editor
In the Select data tab
You can find the name of source layers used in a style using the Select data tab:
- Open the style in the Mapbox Studio style editor.
- Click on the name of the layer in the layer list.
- Switch to the Select data tab.
- Find the source layer listed below the name of the tileset source.
In the Layer overview
You can find the name of source layers used in a style using the Layer overview option:
- Open the style in the Mapbox Studio style editor.
- Click on the Settings button in the top toolbar.
- Scroll down to Layer overview section.
Name a source layer
Your ability to name a source layer depends on the tool you use to prepare your data and upload it to Mapbox.
- Mapbox Studio. When you upload an accepted file type to Mapbox Studio, Studio generates a name for the resulting tileset's source layer or layers based on the original file. This automatically generated source layer name cannot be edited.
- Mapbox Tiling Service with the tileset recipe. When you use Mapbox Tiling Service (MTS) to create a new tileset, you can set source layer names for a tileset in the tileset recipe. These source layer names can only be edited at the tileset recipe level, and you must follow the steps outlined in Update a tileset with MTS to see the name change.
Related resources:
Additional Developer Resources