用于“去聚类”的算法和技术使用 OpenLayers 绘制地图特征
我正在使用 OpenLayers(尽管我需要的建议更一般)来创建“非集群”行为。
我不想将在给定缩放级别上彼此接近的多个功能折叠为单个功能,而是想做相反的事情:将这些功能分开,以便每个功能在视觉上都清晰可辨。对于我的应用程序(跟踪路由可视化应用程序),缩小时要素的精确位置基本上无关紧要,但清楚地看到每个要素(和标签)至关重要。
对于两个特征,该技术似乎微不足道(找到由两个特征定义的线并沿着该线推开)。但是如果有两个以上的特征呢?我的几何学很弱——我觉得这一定是一个可以通过简单解决方案解决的问题,但我不知道该使用什么神奇的词语来开始我的研究。我应该去哪里学习如何做到这一点?哪些技术是已知的快速且稳定的?
如果您能给我指出一些资源,这些资源不仅有助于将要素推开,而且有助于更改标签位置以保持要素尽可能接近其正确的地理位置,那就加分了。
I'm working with OpenLayers (though the advice I need is more general) to create an "unclustering" behavior.
Instead of collapsing multiple features that are close to each other at a given zoom level into a single feature, I want to do the opposite: Push those features apart so each can be visually legible. For my application (a traceroute visualisation app), the precise location of a feature when zoomed out is basically irrelevant, but seeing each feature (and label) clearly, is of utmost importance.
For two features, the technique seems trivial (find the line defined by the two features and push away along that line). But what about more than two features? My geometry is weak -- I feel like this must be a solved problem with a simple solution, but I don't know what magic words to use to even start my research. Where should I be looking to learn how to do this? What techniques are known to be fast and stable?
Bonus points if you can point me to resources that will help not only with pushing the features away, but with changing label position to keep the features as close to their correct geographic position.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论