Polygon Collection?

Currently, I have some code working that allows a user to click on a polygon on the globe to select the polygon, then perform a number of different functions to it. These functions use the polygon's ID to send calls to various web services.

Now, I'm trying to extend this functionality to operate on groups/collections of polygons. For example, say we have polygon groups A, B, and C, with associated polygons a1 and a2; b1; and c1, c2, and c3. When the user clicks on c2, I'd like to automatically select c1 and c3 as well, and have a unique ID for polgyon group C, not polygon c2, to send back to the web services. Is anything like this possible natively in Cesium? If not, I was thinking I could implement a function to automatically search for "sister" polygons when the user selects a polygon based on a naming convention.



Add all your sister polygons to an array, and give each polygon a
reference to this array, e.g., polygon.sisterPolygons = ...

When you do a pick, you can use the array to operate on all the sister polygons.


Perfect! Thanks!