为什么我的 KML 文件不会显示在 Google 地图上?
谁能告诉我为什么这个 kml 文件不会显示在谷歌地图上?
我使用以下代码将其添加到地图对象中,该对象似乎与其他 kml 文件配合得很好。
var kml = new google.maps.KmlLayer('http://www.emotination.com/kml/tasman.kml');
kml.setMap(map);
提要验证器说它有效,并且它对于谷歌服务器来说不是太大而无法解析?
地图直接放大到海洋中!
Can anyone tell me why this kml file won't display on google maps?
Im using the following code to add it to the map object which seems to work fine with other kml files.
var kml = new google.maps.KmlLayer('http://www.emotination.com/kml/tasman.kml');
kml.setMap(map);
Feed validator says its valid and it isn't too big for googles servers to parse?
The map just zooms right into the ocean!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要确保 Google 的服务器不会显示您的 kml 文件的缓存副本。
一个好的方法是执行 Björn 在他的评论中建议,只需添加一个时间戳即可在网址末尾添加:
You need to ensure Google's servers aren't displaying a cached copy of your kml file
A good way to do this is to do what Björn suggests in his comment and just add a timestamp so the end of the url: