简体   繁体   English

在Google地图上一半加载的KML文件

[英]kml file half loaded on google maps

I am loading kml files on Google maps. 我正在Google地图上加载kml文件。 99% of the time it works but there have been instance when the kml file does not fully load. 它有99%的时间可以工作,但有一些实例显示kml文件没有完全加载。 Currently i am caching the kml files every night in memcache so it does not need to send request to Google every time. 目前,我每天晚上都在memcache中缓存kml文​​件,因此不需要每次都向Google发送请求。 I have attached pictures where you can see the kml file is half loaded. 我已附上图片,您可以在其中看到kml文件已加载一半。 I cannot see any errors in Apache, browser or application logs. 我在Apache,浏览器或应用程序日志中看不到任何错误。 Can anyone help? 有人可以帮忙吗?

http://i.stack.imgur.com/vT0zQ.jpg http://i.stack.imgur.com/vT0zQ.jpg

http://i.stack.imgur.com/DoJPc.jpg http://i.stack.imgur.com/DoJPc.jpg

These lines are rendered server side by GMaps, as image tiles. 这些行由GMaps在服务器端呈现为图像图块。

Unfortunatly sometimes Gmaps - for some unknown reason fails to draw some tiles. 不幸的是,有时Gmap-由于某些未知的原因而无法绘制某些图块。 And once its failed, the failed tile is cached. 一旦失败,就会缓存失败的磁贴。 You can sometimes get round it by refreshing the browser. 有时您可以通过刷新浏览器来解决问题。

I dont think there is a known solution, other than forcing GMaps to try to redraw the tiles - easiest way to do that is to change the url of the kml file - so gmaps renders it from scratch. 我不认为有一个已知的解决方案,除了强制GMaps尝试重新绘制图块-做到这一点最简单的方法是更改​​kml文件的url-因此gmaps从头开始渲染它。

Could just add a fake paramater in JS, which is then ignored by your server, but gmaps sees it as a new url. 可以在JS中添加一个伪参数,然后服务器将其忽略,但gmaps会将其视为新的url。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM