メインコンテンツまでスキップ

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.

PropertyTypeDescription
showPedestrianRoadsBooleanShows or hides all pedestrian roads, paths, trails.
showPlaceLabelsBooleanShows or hides place label layers.
showPointOfInterestLabelsBooleanShows or hides all POI icons and text.
showRoadLabelsBooleanShows or hides all road labels, including road shields.
showTransitLabelsBooleanShows or hides all transit icons and text.
show3dObjectsBooleanShows 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
themeStringSwitches between 4 themes: default, faded, monochrome & custom.

Important: configuration available starting from v11.5.2 SDK
theme-dataStringLUT image encoded in Base64 to create a custom color theme.

Important: configuration available starting from v11.9.0 SDK
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.
fontStringDefines 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
colorPlaceLabelHighlightColorPlace label color used when setting highlight feature-state.

Important: configuration available starting from v11.9.0 SDK
colorPlaceLabelSelectColorPlace label color used when setting select feature-state.

Important: configuration available starting from v11.9.0 SDK
colorMotorwaysColorColor override for Motorways.
colorTrunksColorColor override for Trunk Roads.
colorRoadsColorColor 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

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.

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
このpageは役に立ちましたか?