How to style individual buildings

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 Map Designer 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.