How to style individual buildings

Map design Highlighting features on maps

This set of articles represents a recommended selection of Highlighting features on maps examples.

  1. How to style individual buildings
  2. How to highlight specific national boundary on your map
  3. How to highlight specific country on your map
  4. Masking features in MapTiler Cloud

Do you want to highlight specific buildings on your map? This can be easily achieved with filtering based on ID.

Select the building

First, go to the Customize tool and duplicate the Building layer (right-click > Duplicate). Find the building you want to highlight, switch to the Data tab, and click on it. Now, you can see the specific ID. You can click on the value to copy it to the clipboard.

building_data.png

Filter in JSON editor

Once you have the building ID, add a filter in the JSON Editor (Alt+E). The filter needs to be in the following format.

["==", [ "id" ], 1145174506]

building_filter.png

To avoid duplications, you should remove the selected building from the first layer (in our case Building 3D).

["!=", [ "id" ], 1145174506]

Now, you can style the selected building any way you want. Change the color, opacity, or just anything!

building_highlight.png

Next steps

Continue to How to highlight specific national boundary on your map to learn how to highlight a specific country’s national boundary.