Google Map api v3 - IE7 - main.js错误 - 无效参数(javascript) [英] Google Map api v3 - IE7 - main.js error - invalid argument (javascript)

查看:136
本文介绍了Google Map api v3 - IE7 - main.js错误 - 无效参数(javascript)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://bit.ly/xkHPnU



<我已经查看了所有的时间问题,而且我似乎无法解决这个错误。在IE7和兼容模式下发生警告错误。

 网页错误详情

用户代理:Mozilla / 4.0(兼容; MSIE 7.0; Windows NT 6.1 ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Timestamp:Fri,2012年3月2日21:58:06 UTC


消息:无效的参数。
行:27
字符:56
编码:0
URI:http://maps.gstatic.com/intl/zh_CN/mapfiles/api-3/7/12 /main.js

需要另一种眼光。



谢谢。

解决方案

e.minWidth = W(d) W(d)的结果等于'-12px',并且IE不希望将负值设置为minWidth属性。

进一步调试我可以看到这段代码与地图控件的渲染有关。此外,问题只适用于Map / Satellite视图之间的切换按钮( c 变量的值为roadmap)。此外,它看起来像通过触发 onchange 事件来执行代码,该事件可能会连接到地图上的选项卡。作为一项测试,我在Proxomitron中用一条简单的规则删除了这些选项卡,并且该错误不再出现。

因此,尝试将这些标签放置在这样的位置或方式中(例如将父div的位置设置为相对位置,并将标签的父母位置设置为绝对位置和负值 top css属性),它们下面的部分在初始化时不会更改大小(制表符脚本应用于它们),或者在渲染后初始化您的谷歌地图(设置一些延迟)。


http://bit.ly/xkHPnU

I've looked at all of the timing issues, and I can't seem to resolve this error. Occurs in IE7 and compatibility modes as a warn-on error.

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Timestamp: Fri, 2 Mar 2012 21:58:06 UTC


Message: Invalid argument.
Line: 27
Char: 56
Code: 0
URI: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/7/12/main.js

Need another set of eyes on it.

Thanks.

解决方案

The problem appears at line 27, here: e.minWidth=W(d). The result of W(d) is equal to '-12px' and IE does not want to set negative value to the minWidth attribute.

Debugging further I can see that this code is related to the rendering of the map controls. Moreover, the problem have place only for the switch-button between Map/Satellite views (value of c variable is "roadmap"). Also it looks like the code is executed by triggered onchange event, which might be connected to the tabs over the map. As a test I removed those tabs with a simple rule in Proxomitron and that error did not appear any more.

So, try to place those tabs in such location or way (for example with position for the parent div set to relative and the parent of tabs with absolute position and negative value of the top css attribute) that the part under them will not change size during their initialization (tabs script applied to them) or initialize your google map after their rendering (set some delay).

这篇关于Google Map api v3 - IE7 - main.js错误 - 无效参数(javascript)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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