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.
You can try out many of the configuration options listed below in the Mapbox Standard Style Playground. This interactive tool allows you to see how different configurations affect the map style in real-time, and see the implementation code for web, iOS, and Android projects.
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.
Standard
The following configurations are available in Mapbox Standard starting with the version number indicated in the Compatibility section below.
Property | Type | Description | Compatibility |
---|---|---|---|
showPedestrianRoads | Boolean | Show or hide pedestrian roads, paths, trails. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showPlaceLabels | Boolean | Show or hide place label layers. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showPointOfInterestLabels | Boolean | Show or hide POI icons and text. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showRoadLabels | Boolean | Show or hide road labels, including road shields. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showTransitLabels | Boolean | Show or hide transit icons and text. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
show3dObjects | Boolean | Show or hide 3d objects (3D buildings, landmarks, trees, etc.) including shadows, ambient occlusion, and flood lights. | Android and iOS SDK v11.5.2 and GL-JS v3.5.2 |
showLandmarkIcons | Boolean | Show or hide landmark icons. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
showLandmarkIconLabels | Boolean | Show or hide landmark icon labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
showAdminBoundaries | Boolean | Show or hide administrative boundaries. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
theme | String | Switches between 4 themes: default , faded , monochrome & custom . | Android and iOS SDK v11.5.2 and GL-JS v3.5.2 |
theme-data | String | LUT image encoded in Base64 to create a custom color theme. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
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. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
font | String | Defines font family for the style, including any custom font uploaded to your account. Mapbox Standard will fallback to a default font if a custom font family doesn't include necessary weights (weights used by the basemap: Bold , Medium , Regular , Italic ). We recommend the following default Mapbox fonts: 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 . | Android and iOS SDK v11.11.0 and GL-JS v3.14.0 |
colorModePointOfInterestLabels | String | Switches between default and single color modes for POI labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
backgroundPointOfInterestLabels | String | Switches between circle and none for the background of POI labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
densityPointOfInterestLabels | Number | Set the density of POI labels between 1 and 5 , default set to 3 . | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorPlaceLabels | Color | Color override for place labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorRoadLabels | Color | Color override for road labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorGreenspace | Color | Color override for greenspaces such as forests, parks, and woods. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorWater | Color | Color override for water. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorAdminBoundaries | Color | Color override for administrative boundaries. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorPointOfInterestLabels | Color | Color override for POI labels with a single color. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorMotorways | Color | Color override for motorways. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorTrunks | Color | Color override for trunk roads. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorRoads | Color | Color override for other roads. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorBuildingHighlight | Color | Building color used when setting highlight feature-state. | Android and iOS SDK v11.10.0 and GL-JS v3.10.0 |
colorBuildingSelect | Color | Building color used when setting select feature-state. | Android and iOS SDK v11.10.0 and GL-JS v3.10.0 |
colorPlaceLabelHighlight | Color | Place label color used when setting highlight feature-state. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorPlaceLabelSelect | Color | Place label color used when setting select feature-state. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
Standard-Satellite
The following configurations are available in Mapbox Standard-Satellite starting with the version number indicated in the Compatibility section below.
Property | Type | Description | Compatibility |
---|---|---|---|
showRoadsAndTransit | Boolean | Show or hide roads and transit networks. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showPedestrianRoads | Boolean | Show or hide pedestrian roads, paths, trails. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showPlaceLabels | Boolean | Show or hide place label layers. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showPointOfInterestLabels | Boolean | Show or hide POI icons and text. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showRoadLabels | Boolean | Show or hide road labels, including road shields. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showTransitLabels | Boolean | Show or hide transit icons and text. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
showAdminBoundaries | Boolean | Show or hide administrative boundaries. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
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. | Android and iOS SDK v11.0.0 and GL-JS v3.0.0 |
font | String | Defines font family for the style, including any custom font uploaded to your account. Mapbox Standard will fallback to a default font if a custom font family doesn't include necessary weights (weights used by the basemap: Bold , Medium , Regular , Italic ). We recommend the following default Mapbox fonts: 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 . | Android and iOS SDK v11.11.0 and GL-JS v3.14.0 |
colorModePointOfInterestLabels | String | Switches between default and single color modes for POI labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
backgroundPointOfInterestLabels | String | Switches between circle and none for the background of POI labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
densityPointOfInterestLabels | Number | Set the density of POI labels between 1 and 5 , default set to 3 . | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorPlaceLabels | Color | Color override for place labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorRoadLabels | Color | Color override for road labels. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorAdminBoundaries | Color | Color override for administrative boundaries. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorPointOfInterestLabels | Color | Color override for POI labels with a single color. | Android and iOS SDK v11.11.0 and GL-JS v3.11.1 |
colorMotorways | Color | Color override for motorways. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorTrunks | Color | Color override for trunk roads. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
colorRoads | Color | Color override for other roads. | Android and iOS SDK v11.9.0 and GL-JS v3.9.0 |
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.
Landmark Icons
The landmark-icons
featureset contains all the icons and labels that highlight our 3D landmark buildings.
Feature Properties
Each feature in the landmark-icons
featureset has the following properties:
Property | Description |
---|---|
name | Name of the landmark in local language. |
name_en | Name of the landmark in English. |
short_name | Short name of the landmark in local language. |
short_name_en | Short name of the landmark in English. |
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 when not using the globe projection. Below labels when using the globe projection. Learn more about projections in the Mapbox Style Spec reference. |