在Google Earth中对要素进行分组以在缩小时隐藏细节 [英] Group features in Google Earth to hide detail when zoomed out

查看:127
本文介绍了在Google Earth中对要素进行分组以在缩小时隐藏细节的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试生成一个KML文件,以显示分散在英国各地的一系列功能.我希望将这些功能以较高的缩放级别分组在一起,理想情况下显示为带有功能数量计数的图标,以便用户可以轻松查看功能集群.

I'm trying to generate a KML file to display a set of features scattered around the UK. I would like the features to be grouped together at higher zoom levels, ideally displaying as an icon with a count of the number of features, so that users can see clusters of features easily.

本质上,我正在尝试沿

Essentially I'm trying to do something along these lines, but in Google Earth, not Maps.

谁能指出我正确的方向.我是KML的新手:-)

Can anyone point me in the right direction. I'm a bit of a newbie with KML :-)

干杯

RB.

答案:

我自己的研究表明,我可以使用区域为某些要素定义边界框.

My own research suggests I can do what I want using Regions to define bounding boxes for certain features.

还建议我应该使用网络链接来进行此操作,我将对此进行调查,因为出于其他原因,我认为它也更合适.

It has also been suggested I should do this using network links, which I'm going to investigate as I think it's a better match for other reasons too.

推荐答案

这是一个独立的KML文件吗?还是KML作为网络链接的数据返回?

Is this a standalone KML file? Or the KML returned as data for a network link?

在第一种情况下,我不确定这是否可能.我已经看到图层透明度随相机高度"而变化,所以在要素上也可能出现这种情况?然后,您可以将单个要素和组要素都添加到同一KML文件中,并根据到摄像机的距离"使它们可见?可能是我错过的一项新的KML功能,但是您需要查看 KML规范.

In the first case I'm not sure this is even possible. I have seen layer transparency change with "camera altitude", so perhaps something like this is also possible on features? Then you could add both the single features and the groups features into the same KML file and make them visible based on "distance to camera"? Could be a new KML feature I missed, but you'd have the check the KML specification.

在第二种情况下,您只需返回与给定的网络链接视口信息匹配的KML.根据获得的边界框,可以将该框细分为网格和每个框的簇.如果框中有一项功能,请返回该功能.如果一个盒子中有多个,则只为该盒子返回一个分组特征".然后,当用户在Google地球中四处移动时,聚类将自动更改:每台摄像机更改后,将再次调用您的网络链接URL,然后再次使用给定的边界框视口进行特征选择和聚类.这使您的群集动态化.

In the second case, you just return KML that matches the given network link viewport information. Based on the bounding box you get, you can subdivide that box into a grid and cluster per box. If you have one feature in a box, return the feature. If you have more than one in a box, return just a "grouped feature" for that box. The clustering will then automatically change when the user moves around in Google Earth: after each camera change your network link URL is called again and you again do feature selection and clustering with the given bounding box viewport. This makes your clustering dynamic.

有帮助吗?

这篇关于在Google Earth中对要素进行分组以在缩小时隐藏细节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆