user2402107
user2402107

Reputation: 913

Cesium Globe Clustering

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: enter image description here

Upvotes: 1

Views: 2991

Answers (3)

rutsky
rutsky

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

biddyfiddy
biddyfiddy

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

emackey
emackey

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

Related Questions