Mapbox 3D landmarks and lighting presets
Explore Mapbox v3's most exciting new features via a virtual tour of Sydney. Use the arrows to visit different 3D Landmarks, or change the time of day to cycle through the four lighting presets.
About the Mapbox v3 release
The v3 migration guide outlines key changes and new features. Key changes below.
💡 There are now four lighting presets out of the box: day dusk dawn and night . These affect shadows and thematic colors. Example:
map.setConfigProperty('basemap', 'lightPreset', 'dusk')⚙️ Rather than fiddling with layer properties directly, there are six new global config properties to make life
easier: showPlaceLabels showRoadLabels showPointOfInterestLabels showTransitLabels lightPreset and font . Example:
map.setConfigProperty('basemap', 'showPointOfInterestLabels', false)🥞 When adding a custom layer, the before property has been replaced with slot .
This is more intuitive and adaptive to changes in the style definition. There are three slot choices:
| Slot | Description |
|---|---|
bottom | Above polygons (land, landuse, water, etc.) |
middle | Above lines (roads, etc.) and behind 3D buildings |
top | Above all existing layers in the style |
map.addLayer({ id: 'points-of-interest', slot: 'middle', ... })