How to style individual buildings

Do you want to highlight specific buildings on your map? On this page you’ll learn how to isolate selected buildings so you can style them in custom colors or apply 3D extrusion to make them literally stand out.

Styled buildings

Add a new building layer

The layer that contains filterable building details isn’t included in our maps by default, so the first step is to add it:

  1. In your MapTiler account, page Maps, click on the map you want to use. It can be any map including custom.

  2. Under the map preview, click Customize. This opens the map in Map Designer.

  3. Go to menu Layers and click the plus button to add a new layer.

  4. Find the Buildings dataset and select the building layer in it. Add it to your map.

Filter out your buildings

Now you have a new layer in the Built-up block and you can proceed to filter out the buildings you want to style.

  1. In the layer panel, switch view from Style to Data. Click on the desired building to show its details and click on the id to copy it.

    Copy the building ID

  2. In the Filter section, click the plus button to open the Filter by attribute menu. Select id.

    Filter building by id

  3. Paste the copied building ID to the input field and add it. Then hover over the building ID and Select only this value to hide all the other buildings.

    Add building IDs

Repeat these steps to add any other buildings you want to style in the same way.

If your map contains multiple building layers, their styling can interfere and create unwanted "effects". You can use the little eye icon on any problematic layer to hide it, but the best practice is to have just one layer for regular buildings and another one for the styled buildings, where the regular layer has a filter to exclude the styled buildings. To do that, go to the regular buildings layer, switch view to Data, and replace the MapTiler Planet data source with Buildings. Now you can add a building ID filter as described above.

Style the buildings

With your buildings filtered out, switch view from Data back to Style and you’re ready to do the magic!

Adjust color

In the layer panel, define the building’s color, opacity, outline, or other properties.

Style building in color

Use 3D extrusion

To apply 3D shape, switch the visualization method to Extrusion. Tilt the map (right mouse button) to get a better view angle and adjust the color, opacity, and building height as needed.

Extrude building

Style multiple buildings

What if you’re working with multiple buildings and want to style each of them differently? Reuse your existing building layer to achieve that:

  1. Right-click the building layer and select Duplicate. We recommend to Rename the duplicated layer, especially if you’re going to create more copies.

  2. Switch view to Data. In the Filter section, hover over a building ID and click Select only this value.

  3. Switch view to Style and adjust the layer as preferred. Repeat for all buildings you want to style separately.

    Style multiple buildings differently

Save and Publish your map, and you’re ready to show it on your website.

By default, every map opens on a whole world view. If you'd like to show the location of your styled buildings instead, adjust the default view in the map settings.