3D Tileset - Get entity based on attribute (in order to fly to it)

Hi everyone,

I'm trying to develop a feature where I fly to an entity (a building in this case) based on an attribute it has.

A bit of context:
· I have a CityGML with a few thousand buildings I'm serving through Ion as a tileset.
· All of the buildings in the CityGML have an attribute, let's call it "BuildingID". It is unique, meaning there are no buildings with the same value for it.
· Currently, users can click on the building and the camera will fly to it, in a similar fashion to what's found here with "Zoom to feature" selected: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Interactivity.html&label=3D%20Tiles

The challenge:
· I will have a list of buildings in the UI of the app. If the user selects a building on that list, I can retrieve the same BuildingID that's in the 3D model as an attribute.
· Here's the problem: I have no clue on how to "select" that building in order to fly to it.

If these were other data sources such a KML, I could retrieve the entity and fly to it, but with a 3D Tileset, I don't even know where to start.

I'm using Cesium 1.57, but I have no problems in updating if necessary.

I think there’s currently no easy way to query for that, but it is something I’d like to see better support for.

For now, I think your best bet would be to to iterate over all the tiles, then all the features of each tile, and see which one has that property. There’s some info on that that may be helpful in the threads below: