Glossary

style layer

A style layer is a visual representation of geographic features on a map. It defines both the features that should be displayed and the visual properties that should be applied to those features. A style layer is one part of a larger style document, which may consist of many different style layers. Style layers contain both a reference to the data for which they're defining a style, as well as the styling rules to be applied.

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

  • In a map's style document.
  • In the Mapbox Studio style editor using the layer list.
  • In the Mapbox Studio style editor using the Layer overview option in the top toolbar's Settings tab.

A map's style document

In the following example, the style layer has an id of rivers. It specifies that the waterway source layer in the my-source data source (the reference to the data) should be styled with a light pink line-color, #FFC0CB (the styling rules):

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

Layers list in the Mapbox Studio style editor

To find the name of the style layers used in a Mapbox style:

  1. Open the style in the Mapbox Studio style editor.
  2. The style layers are listed in the layers list on the left side of the screen.

Layer overview in the Mapbox Studio style editor

To find the name of a style layer:

  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?