Add 3D buildings
This is a modified version of the Basic template style.
The data used in this example comes from the
buildinglayer has changed to a
fill extrusionlayer type and the style properties have been modified.
The Light option in the toolbar has been modified.
- Building data: The data used in this example comes from the
mapbox-streets-v7tileset. Buildings in this tileset are available at zoom levels 13 and higher. Building features include both a
extrusiondata property. The
extrudefield indicates whether the object should be included in 3D-extrusion renderings while the
heightfield contains the height of a building or building part in meters (rounded to the nearest integer). This particular layer has been filtered to only include features that has an
true. Read more about available data.
- Fill extrusion layer type: Creating 3D effects in Mapbox styles requires using a
fill-extrusionlayer. Read more about fill extrusion layers in the Mapbox Style Specification.
- Styling with extrusions: Styling a feature based on a data property of that specific feature requires using expressions. Read more about expressions in the Mapbox Style Specification.
Looking for more guidance? Read our Add 3D buildings to a Mapbox Studio style tutorial.