How could I search the 3D-Tile from it attribute?

My Question:

I would like to know how could I search by attribute or get info or interact with the specific 3D tile.

For example, I would like to select or pick the 3Dtile object that has the id-property “xxxxxxxx” then, flyTo it and gets its other properties.

Currently, I could only change the styling of a specific 3D-tile base on this example

My Cesium version:

1.51 (Running with Nodejs + Chrome)

What am I doing?:

I want to create an application that connects to the real-time sensor database and alerts on some danger situation: fire/ flood/ …

Thank you in advance,

Joe

I think to do that you’ll need to traverse the tileset’s children and look for the one that has this property. You can do this by first getting the root tile:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileset.html?classFilter=Cesium3DTileset#root

And subsequently the children of each tile:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTile.html#children

The only problem I can see with this is that if the tile isn’t loaded or not in view yet, then it won’t have its properties loaded. Another way is to listen for the tileVisible event and check each new tile visible if it’s the one you’re looking for:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileset.html#tileVisible

Does that work for you?