Google Maps API V3 - Internet Explorer [英] Google Maps API V3 - Internet Explorer

查看:104
本文介绍了Google Maps API V3 - Internet Explorer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好我有一些问题,我的JavaScript不能在IE中工作。这就是说,我一直在寻找这样的老帖子。





谷歌地图-API的标记图像 - 未示出 - 在-internet-explorer



我仍然无法弄清楚问题所在。当我调试我最终在minifed谷歌API代码,并不知道发生了什么事情(类似于这篇文章谷歌地图 - JavaScript-api错误在互联网浏览器)。我可以说的一件事是,当我跨过错误时,多边形开始按它们的顺序绘制(顺序位于 windData.js 。我想这个问题可能与我的方式有关 windData.js setup。



我不认为问题出在全局变量映射上,因为当你输入一个地址并点击搜索它重新在该位置的中心地图,但然后标记不绘制,并infowindow不出现。

我看到的一个CSS注释是搜索按钮和导航栏似乎没有正确排队,更具体地说,浏览栏不在IE中排队,搜索栏并不排队在Firefox中。



全部我的测试我一直在使用Internet Explorer 9,Firefox 7.0.1和Chrome 15.0.874.120米。



感谢advanc e寻求你的帮助。此外,我对这一切都很陌生,任何有关如何做事的建议都将非常感谢。

明显的问题是这样的事情:

 路径:[
new google.maps.LatLng(27.32074511436256,-99.53600600398401 ),
new google.maps.LatLng(27.30459798514129,-99.5366568769641),
...
new google.maps.LatLng(27.32074511436256,-99.53600600398401),
],

在最后一个LatLng之后,在结束] 会在Internet Explorer中导致错误。我认为你所有的路径数组都留下了这个逗号。


Hi I am having some problems with my javascript not working in IE. That being said I have been looking through older post such as these.

google-maps-javascript-api-error-in-internet-explorer

google-maps-api-marker-images-not-showing-in-internet-explorer

I still cant figure out what the problem is. When I debug I end up in the minifed google api code and have no idea what is going on (Similar to this post google-maps-javascript-api-error-in-internet-explorer ) . One thing that I can tell is that as I step over the errors the polygons start to to be drawn in the order that they are ( order is at the bottom of windData.js. I think the problem might have to do with the way I have windData.js setup.

I dont think the problem is with a global variable map since when you enter a address and click search it re-centers the map on that location, but then the marker is not drawn and the infowindow does not appear.

One CSS note that I saw was that the search button, and nav bar dont seem to be lining up correctly. More specifically the Nav bar doesnt line up in IE. The Search bar doesnt line up in Firefox.

For all my testing I have been using Internet Explorer 9, Firefox 7.0.1 and Chrome 15.0.874.120 m.

Thanks in advance for your help. Additionally I am new to all this and any recommendations you have on how I should do thing would be greatly appreciated thanks.

解决方案

One obvious problem is this sort of thing:

paths: [
    new google.maps.LatLng(27.32074511436256,-99.53600600398401),
    new google.maps.LatLng(27.30459798514129,-99.5366568769641),
    ...
    new google.maps.LatLng(27.32074511436256,-99.53600600398401),
    ],

The comma after the last LatLng, before the closing ] will cause errors in Internet Explorer. I think all your paths arrays leave that comma in.

这篇关于Google Maps API V3 - Internet Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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