Google地图改变了KML [英] Google Maps mangling KML

查看:166
本文介绍了Google地图改变了KML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google Maps API创建了一些世界区域的KML文件以供显示。这一直工作正常,但最近开始显示一个区域,就好像数据被破坏一样。你可以在这里看到我的意思:



https://drive.google.com/file/d/0B9u3tNbtEyFRMTdwQTdEa0U5S2s/view?pli=1



如果我加载Google我的地图中的相同KML仍能正确显示: $ b

https://www.google.com/maps/d/viewer?mid=z8mYjxPmAgBQ.kGn7mza0JOSU



它用于显示正常,但现在即使我回滚到文件的以前版本,它以这种奇怪的方式显示。



KML区域使用QGIS的Vector> Geoprocessing工具>溶解工具合并国家(shp文件),然后我保存为KML。数据来自自然地球的ne_50m_admin_0_countries数据集



有人知道可能会出现什么问题吗?

解决方案

我会说Google Maps KML渲染引擎有一些问题。它适用于我使用 geoxml3 第三方分析程序进行渲染的情况,但在我使用Google Maps JavaScript API v3 KmlLayer来呈现它。



用geoxml3渲染



请注意,性能与第三方解析器将取决于KML的复杂性。在KmlLayer中使用的图块基础渲染几乎总是会表现得更好。



issue#8003 in the Google Maps Javascript API ve issue tracker


I've created KML files of some world regions for display using the Google Maps API. This has been working fine, but one region has recently started displaying as if the data's corrupt. You can see what I mean here:

https://drive.google.com/file/d/0B9u3tNbtEyFRMTdwQTdEa0U5S2s/view?pli=1

If I load the same KML in Google My Maps it still displays correctly:

https://www.google.com/maps/d/viewer?mid=z8mYjxPmAgBQ.kGn7mza0JOSU

It used to display fine, but now even if I roll back to previous versions of the file it displays in this weird way.

The KML regions are created using QGIS's Vector > Geoprocessing Tools > Dissolve tool to merge countries (to shp files), which I then save off as KML. Data is from Natural Earth's ne_50m_admin_0_countries data set.

Does anyone know what might be going wrong?

解决方案

I would say that the Google Maps KML rendering engine has some issues. It works when I use the geoxml3 third party parser to render it, but not when I use the Google Maps Javascript API v3 KmlLayer to render it.

rendered with geoxml3

Note that the performance with third party parsers will depend on the complexity of the KML. Tile base rendering like used in KmlLayer will almost always perform better.

issue #8003 in the Google Maps Javascript API ve issue tracker

这篇关于Google地图改变了KML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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