How to colour a 3d tileset based on the polygon created

Hi ,
   I have a polygon created in cesium. I want to colour the buildings 3d tileset (only buildings) that reside inside the polygon. How this can be achived.

There could be two ways, depending on what your tileset is like. Check out the approaches in this thread:

https://groups.google.com/d/msg/cesium-dev/iCluw9oomqA/TQBiSA2IBwAJ

Let me know if that helps.

Not sure how to get the properties of a tileset. How to get all the property list if a tilest which is rendered?

If you have a tileset, you can get its root (or its children):

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

And then get the content:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTile.html?classFilter=Cesium#content

For this tile’s content, you can call get feature:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileContent.html#getFeature

Which, finally, you can get its property names by calling this function:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileFeature.html#getPropertyNames

Let me know if that solves your issue!

Hi.
Yes i am able to get all the properties of a tileset and color 3d tile based on id.

Have one more quick question is on my tileset small entity polygons are created to highlight a set of tile which recide inside those polygon.

All i want to check is weather i can highlight or color only 3d building that reside inside a polygon using style color of tile rather than using the colour of polygon.

Don’t want to colour 3d tileset based on id. Want it to be done based on which 3d reside in a polygon and then colour all of those

Arti Bundiwal

please find the link of code.
i want buildings to be colored which are on red polygon.

Can any one let me know how this can be done.

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=rVhtb+I4EP4rVnUSQaJ5D0nYbu+67eq20r6pRXdaLfvBJCaxNtjIdqBc1f9+4ySE0NIu7ZYPLYSZeR57nhmPsSx0hlIy54jPEGWKCJwouiTIu0BjWhCJpFoXlGUTZlnoun6PCsyyEmcEXfCknBOmsKKcjVCu1EKOLCujKi+nZsLn1hnDxVrRBBd/C7zIaSIvWWJ56bHS0S0lCLHmWAKwJRckoTMw1cGs6w7uu5IWqQZOscIo4aVQRK415c/fztGXBWEX+osFFwoXNQ1gsVqtHJOtEzPjS0tSRayUU6UsyqiiWK9SaiLTJri5gBVN2BILtKRkRQR6ixhZoXMiaTk3/6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