Google地球会加载KML 2.2,但不会加载Google Maps [英] Google Earth loads KML 2.2 but not Google Maps

查看:138
本文介绍了Google地球会加载KML 2.2,但不会加载Google Maps的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google地图脚本我似乎已经加载了来自芝加哥的KML示例文件很好,但是当验证文件时,它说存在一些错误-考虑到这是我的输出,它周围有什么办法吗?从应用程序中获取?

The Google maps script I have seems to load the example KML from Chicago files fine, but when I add my own, it fails. The KML standard is 2.2 - why doesn't Google Maps manage to read it (Google Earth seems to work fine)? When I tried to validate the file it said there were some errors - is there any way around it given that this is an output I get from an application?

推荐答案

Google地图为我加载kml.我的服务器不支持扩展名为.kml的KML,就像扩展名为.xml的XML一样,因为未针对KML/KMZ MIME类型进行配置,您的服务器上可能存在相同的问题.

geoxml3, KmlLayer and Google Maps load your kml for me. My server doesn't support KML with the .kml extension, just as XML with the .xml extension because it isn't configured for the KML/KMZ MIME types, you might have the same problem on your server.

有关Google Maps API v3的问题,请参见此问题跟踪器有关线路上的峰值".

See this issue on the Google Maps API v3 issue tracker regarding the "spikes" on the line.

另一个选择是查看 KmlLayer.getStatus()返回(

Another option would be to to see what KmlLayer.getStatus() returns (Kml Status:DOCUMENT_NOT_FOUND). The cta.kml example returns Kml Status:OK.

这篇关于Google地球会加载KML 2.2,但不会加载Google Maps的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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