Skip to main content

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.

PLAYGROUND
Mapbox Standard Style Playground

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.

PropertyTypeDescriptionCompatibility
showPedestrianRoadsBooleanShow or hide pedestrian roads, paths, trails.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showPlaceLabelsBooleanShow or hide place label layers.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showPointOfInterestLabelsBooleanShow or hide POI icons and text.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showRoadLabelsBooleanShow or hide road labels, including road shields.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showTransitLabelsBooleanShow or hide transit icons and text.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
show3dObjectsBooleanShow 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
showLandmarkIconsBooleanShow or hide landmark icons.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
showLandmarkIconLabelsBooleanShow or hide landmark icon labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
showAdminBoundariesBooleanShow or hide administrative boundaries.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
themeStringSwitches between 4 themes: default, faded, monochrome & custom.Android and iOS SDK v11.5.2 and GL-JS v3.5.2
theme-dataStringLUT image encoded in Base64 to create a custom color theme.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
lightPresetStringSwitches 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
fontStringDefines 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
colorModePointOfInterestLabelsStringSwitches between default and single color modes for POI labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
backgroundPointOfInterestLabelsStringSwitches between circle and none for the background of POI labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
densityPointOfInterestLabelsNumberSet 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
colorPlaceLabelsColorColor override for place labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorRoadLabelsColorColor override for road labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorGreenspaceColorColor override for greenspaces such as forests, parks, and woods.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorWaterColorColor override for water.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorAdminBoundariesColorColor override for administrative boundaries.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorPointOfInterestLabelsColorColor override for POI labels with a single color.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorMotorwaysColorColor override for motorways.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorTrunksColorColor override for trunk roads.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorRoadsColorColor override for other roads.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorBuildingHighlightColorBuilding color used when setting highlight feature-state.Android and iOS SDK v11.10.0 and GL-JS v3.10.0
colorBuildingSelectColorBuilding color used when setting select feature-state.Android and iOS SDK v11.10.0 and GL-JS v3.10.0
colorPlaceLabelHighlightColorPlace label color used when setting highlight feature-state.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorPlaceLabelSelectColorPlace 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.

PropertyTypeDescriptionCompatibility
showRoadsAndTransitBooleanShow or hide roads and transit networks.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showPedestrianRoadsBooleanShow or hide pedestrian roads, paths, trails.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showPlaceLabelsBooleanShow or hide place label layers.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showPointOfInterestLabelsBooleanShow or hide POI icons and text.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showRoadLabelsBooleanShow or hide road labels, including road shields.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showTransitLabelsBooleanShow or hide transit icons and text.Android and iOS SDK v11.0.0 and GL-JS v3.0.0
showAdminBoundariesBooleanShow or hide administrative boundaries.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
lightPresetStringSwitches 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
fontStringDefines 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
colorModePointOfInterestLabelsStringSwitches between default and single color modes for POI labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
backgroundPointOfInterestLabelsStringSwitches between circle and none for the background of POI labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
densityPointOfInterestLabelsNumberSet 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
colorPlaceLabelsColorColor override for place labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorRoadLabelsColorColor override for road labels.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorAdminBoundariesColorColor override for administrative boundaries.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorPointOfInterestLabelsColorColor override for POI labels with a single color.Android and iOS SDK v11.11.0 and GL-JS v3.11.1
colorMotorwaysColorColor override for motorways.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorTrunksColorColor override for trunk roads.Android and iOS SDK v11.9.0 and GL-JS v3.9.0
colorRoadsColorColor 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

PropertyTypeDescription
hideBooleanwhen 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:

PropertyDescription
nameName of the point of interest.
classA broad point of interest category, for example 'food_and_drink'.
makiAn icon identifier, designed to assign icons using the Maki icon project or other icons that follow the same naming scheme.
groupA high-level point of interest category like airport, transit, etc.

Available for features with group = transit-label:

PropertyDescription
transit_modeMode of transport served by a stop/station.
transit_stop_typeA type of transit stop.
transit_networkA rail station network identifier that is part of specific local or regional transit systems.

Available for features with group = airport-label:

PropertyDescription
airport_refA 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

PropertyTypeDescription
hideBooleanWhen true, hides the label. Use this state when displaying a custom annotation in place of the hidden symbol.
highlightBooleanWhen true, the feature is highlighted. Use this state to create a temporary effect (e.g., hover).
selectBooleanWhen 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:

PropertyDescription
nameName of the place label
classProvides 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:

PropertyDescription
nameName of the landmark in local language.
name_enName of the landmark in English.
short_nameShort name of the landmark in local language.
short_name_enShort 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:

SlotDescription
bottomAbove polygons (land, landuse, water, etc.)
middleAbove lines (roads, etc.) and behind 3D buildings
topAbove POI labels and behind Place and Transit labels
not specifiedAbove 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.
Was this page helpful?