gmaps API v3在IE上加载非常缓慢 [英] gmaps API v3 very slow loading on IE

查看:103
本文介绍了gmaps API v3在IE上加载非常缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一篇文章,所以我希望我在正确的位置。
我使用google maps API v3.0创建了一个带有地图的本地html页面。它在Chrome和Firefox上运行良好,但不在IE上运行。当我尝试打开地图时,浏览器仍停留在超过30/40秒的地图上。一旦地图出现,一切正常。



谷歌提供的例子也一样( https://developers.google.com/maps/documentation/javascript/examples/map-simple



我在Google上搜索了几个小时,但没有找到任何解决方案。
任何帮助都将非常感谢。

解决方案

我认为这可能是因为样式表。

>

根据本网站, p>


IE需要知道地图的大小,以确保它已被设置


似乎IE可能不会试图确定,直到页面完全加载,这需要很长时间。也就是说,在css样式表中添加 width:100%; 应该有所帮助。至少它适用于我。



我主持了一个简单的地图,其中 width:100%; here


this is my first post, so I hope I'm in the right place. I've created a local html page with a map using google maps API v3.0. It works fine on Chrome and Firefox but not on IE. When I try to open the map, the browser remains stuck on a white page loding the maps for more than 30/40 seconds. Once the maps appears everything is ok.

The same happens with the example provided by google (https://developers.google.com/maps/documentation/javascript/examples/map-simple)

I've searched on google for hours but I didn't find any solution. Any help would be very appreciate.

解决方案

I think it might be because of the style sheet.

According to this website,

IE needs to know the size of the map ensure that it has been set

It seems like IE might not try to determine until the page is fully loaded, which sometime takes a long time. That being said, adding the width:100%; in the css style sheet should help. At least it works for me.

I hosted a simple map with width:100%; here.

这篇关于gmaps API v3在IE上加载非常缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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