铯地球聚类
Cesium Globe Clustering
我正在尝试确定 id 有一种官方方法可以简单地在铯球上取点,并且当用户缩小时,它会变成一个簇图像,其下方有点数。我一直在搜索 Stack Overflow 和 Cesium 文档,但一无所获。基于距离的将是首选。我也在使用 AngularJs Cesium Globe 像这样的东西:
不幸的是,目前在核心 Cesium 中不支持开箱即用。 Declutter Roadmap 上讨论了类似的想法。尽管该文档更多地谈论标签而不是标记,但相同或相似的算法可能适用于两者。
你的屏幕截图看起来很酷,我相信总有一天会有人更新这个答案if/when添加了这个功能。
据我所知,Cesium 还没有官方的集群功能。我能够通过使用 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 实现此功能应该足以进行计算。
广告牌、标签和点实体的聚类已在 Cesium 1.26 released on 3 October 2016 (pull request, demo) 中实现。
我正在尝试确定 id 有一种官方方法可以简单地在铯球上取点,并且当用户缩小时,它会变成一个簇图像,其下方有点数。我一直在搜索 Stack Overflow 和 Cesium 文档,但一无所获。基于距离的将是首选。我也在使用 AngularJs Cesium Globe 像这样的东西:
不幸的是,目前在核心 Cesium 中不支持开箱即用。 Declutter Roadmap 上讨论了类似的想法。尽管该文档更多地谈论标签而不是标记,但相同或相似的算法可能适用于两者。
你的屏幕截图看起来很酷,我相信总有一天会有人更新这个答案if/when添加了这个功能。
据我所知,Cesium 还没有官方的集群功能。我能够通过使用 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 实现此功能应该足以进行计算。
广告牌、标签和点实体的聚类已在 Cesium 1.26 released on 3 October 2016 (pull request, demo) 中实现。