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

40 views
Skip to first unread message

Joe, Thunyathep S.

unread,
Dec 9, 2018, 7:32:23 AM12/9/18
to cesium-dev
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

Omar Shehata

unread,
Dec 11, 2018, 3:06:03 PM12/11/18
to cesium-dev
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:


And subsequently the children of each tile:


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:


Does that work for you?
Reply all
Reply to author
Forward
0 new messages