API Reference
This page provides a comprehensive overview of the Mapbox Standard style's configuration options. The Mapbox Standard style is a modern, continuously improving style designed to reduce configuration complexity while delivering high-quality map visualizations.
Configuration Properties
Mapbox Standard provides the following configuration properties which you can apply when first importing the style, or at runtime after the style is already loaded. Implementation code is platform specific, but the configuration options are the same across all platforms.
Property | Type | Description |
---|---|---|
showPedestrianRoads | Boolean | Shows or hides all pedestrian roads, paths, trails. |
showPlaceLabels | Boolean | Shows or hides place label layers. |
showPointOfInterestLabels | Boolean | Shows or hides all POI icons and text. |
showRoadLabels | Boolean | Shows or hides all road labels, including road shields. |
showTransitLabels | Boolean | Shows or hides all transit icons and text. |
show3dObjects | Boolean | Shows or hides all 3d layers (3D buildings, landmarks, trees, etc.) including shadows, ambient occlusion, and flood lights. Important: configuration available starting from v11.5.2 SDK |
theme | String | Switches between 4 themes: default , faded , monochrome & custom . Important: configuration available starting from v11.5.2 SDK |
theme-data | String | LUT image encoded in Base64 to create a custom color theme. Important: configuration available starting from v11.9.0 SDK |
lightPreset | String | Switches between 4 time-of-day states: dusk , dawn , day , and night . Lights can also be fully customized beyond the presets using the Mapbox style specification. |
font | String | Defines font family for the style from predefined options. Options: Alegreya , Alegreya SC , Asap , Barlow , DIN Pro , EB Garamond , Faustina , Frank Ruhl Libre , Heebo , Inter , League Mono , Montserrat , Poppins , Raleway , Roboto , Roboto Mono , Rubik , Source , Code Pro , Spectral , Ubuntu , Noto Sans CJK JP , Open Sans , Manrope , Source Sans Pro , Lato |
colorPlaceLabelHighlight | Color | Place label color used when setting highlight feature-state. Important: configuration available starting from v11.9.0 SDK |
colorPlaceLabelSelect | Color | Place label color used when setting select feature-state. Important: configuration available starting from v11.9.0 SDK |
colorMotorways | Color | Color override for Motorways. |
colorTrunks | Color | Color override for Trunk Roads. |
colorRoads | Color | Color override for all other roads. |
Featuresets
Mapbox Standard includes several predefined featuresets
that can be used to quickly configure the style for specific use cases. Featuresets are a collection of configuration properties that can be applied to the style all at once. The following featuresets are available:
You can use Interactions to retrieve basemap attributes and interact with individual features in POI Label, Place Label and building layers in the basemap.
Featuresets describe a collection of layers that can be interacted with in the Standard style, by setting feature-states
to change their appearance when interacted with, or to query feature attributes. The following interactions have been added:
Points of Interest
The poi
featureset contains all the point of interest layers in the Mapbox Standard style. This featureset is useful for applications that want to display additional information about points of interest on the map, or to highlight points of interest when a user interacts with them.
Feature State
Property | Type | Description |
---|---|---|
hide | Boolean | when true hides the icon and text. Use this state when displaying a custom annotation in place of the hidden symbol. |
Feature Properties
Available for all features in the poi
featureset:
Property | Description |
---|---|
name | Name of the point of interest. |
class | A broad point of interest category, for example 'food_and_drink'. |
maki | An icon identifier, designed to assign icons using the Maki icon project or other icons that follow the same naming scheme. |
group | A high-level point of interest category like airport, transit, etc. |
Available for features with group = transit-label
:
Property | Description |
---|---|
transit_mode | Mode of transport served by a stop/station. |
transit_stop_type | A type of transit stop. |
transit_network | A rail station network identifier that is part of specific local or regional transit systems. |
Available for features with group = airport-label
:
Property | Description |
---|---|
airport_ref | A short identifier code of the airport. |
Place Labels
The place-labels
featureset contains all the place label layers in the Mapbox Standard style. This featureset is useful for applications that want to display additional information about places on the map, or to highlight places when a user interacts with them.
Feature State
Property | Type | Description |
---|---|---|
hide | Boolean | When true , hides the label. Use this state when displaying a custom annotation in place of the hidden symbol. |
highlight | Boolean | When true , the feature is highlighted. Use this state to create a temporary effect (e.g., hover). |
select | Boolean | When true , the feature is selected. Use this state to create an effect that persists until another state is selected. Note: The select state has a higher priority than highlight . |
Feature Properties
Each feature in the place-labels
featureset has the following properties:
Property | Description |
---|---|
name | Name of the place label |
class | Provides a broad distinction between place types. |
You can see select
& highlight
in action in this demo page.
Slots
Mapbox Standard includes three slot layers to help you control where custom layers will appear relative to other layers in the style. The following slots are available:
Slot | Description |
---|---|
bottom | Above polygons (land, landuse, water, etc.) |
middle | Above lines (roads, etc.) and behind 3D buildings |
top | Above POI labels and behind Place and Transit labels |
not specified | Above all existing layers in the style |