Reputation: 913
I am trying to determine id there is an official way to simply take points on the cesium globe and as the user zooms out it turns into a cluster image with the number of points underneath it. I have been searching Stack Overflow and Cesium documentation and have come up empty - handed. Distance based would be preferred. I am also using the AngularJs Cesium Globe Something like this:
Upvotes: 1
Views: 2991
Reputation: 4110
Clustering for Billboard, Label and Point entities has been implemented in Cesium 1.26 released on 3 October 2016 (pull request, demo).
Upvotes: 5
Reputation: 51
As far as I know, there is still no official clustering features with Cesium. I was able to implement this feature by using this resource. There is also a live demo. The solution is to calculate the pixel distance between points, and cluster them together based on a certain pixel distance threshold (we used 100px). Cesium.SceneTransforms.wgs84ToWindowCoordinates
and the distance formula should be enough for the calculation.
Upvotes: 0
Reputation: 12448
Unfortunately there's no support for that out-of-the-box in core Cesium at the moment. Ideas similar to this are talked about on the Declutter Roadmap. Although that document talks more about labels than markers, the same or similar algorithm could likely be used for both.
Your screenshot looks really cool, and I'm sure someone will update this answer someday if/when the feature gets added.
Upvotes: 1