Dropdown that filters buildings by color


So I have a bunch of different tilesets loaded into my project and they are colored according to a phase. So phase one is orange and phase two are blue. These are not colored by property because I could not find out how to set properties but instead just have a style applied to them. I want to make a dropdown function where you select phase one and it just displays all the orange buildings. Then I want to select phase 2 and just display the blue buildings. Does anyone have any suggestion on how to make this?



This is absolutely possible with CesiumJS! Check out this sandcastle demo:

We see that selecting “Show Office Buildings Only” will toggle a subset of the 3D Tiles based on a feature. In this case, the feature is

"${feature['building']} === 'office'"

You can use this demo as a model for writing your code! The demo also shows how to make a drop down menu for selectin “phase 1” or “phase 2” in your case. Let me know if you have any other questions or concerns!