Programatically select a 3D building

On initialisation and loading of a layer which has 3D buildings I want to select one or more buildings programatically.

Basically achieving the same result as single or double clicking a building

Is this possible?

thanks for any help!

Do you have some ID for the building you want to highlight? If so, the easiest way would be to use the 3D Tiles styling language, to highlight the building:

If you want to do a post processing feature like here:

You would need some way to get access to the Cesium3DTileFeature, which would involve iterating over all the tiles in view as discussed here:

Let me know which approach works for you.


thank you for useful links I think it might help solve my requirement. However I have no reference to a Tileset as I am using the 3dCityDB code to initialise a CitydbKmlLayer.

I can’t find a way to get the tilesets. Do you know how to to get a reference to them?

thanks again.

Have you tried uploading your CityGML buildings to Cesium ion ( ? That will create a 3D Tileset of buildings.