Add 3D buildings

  • This is a modified version of the Basic template style.

  • The data used in this example comes from the mapbox-streets-v7 tileset.

  • The building layer has changed to a fill extrusion layer type and the style properties have been modifed.

  • The Light option in the toolbar has been modified.

About this style

  • Building data: The data used in this example comes from the mapbox-streets-v7 tileset. Buildings in this tileset are available at zoom levels 13 and higher. Building features include both a height and an extrusion data property. The extrude field indicates whether the object should be included in 3D-extrusion renderings while the height field 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 extrude property of true. Read more about available data.
  • Fill extrusion layer type: Creating 3D effects in Mapbox styles requires using a fill-extrusion layer. Read more about fill extrusion layers in the Mapbox GL 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 GL Style Specification.

Looking for more guidance? Check out our step-by-step Add 3D buildings to a Mapbox Studio style tutorial.