DDM*_*DDM 2 google-maps internet-explorer-8 google-maps-api-3 google-maps-markers
与以下问题相关: IE8上Google Maps API的未指定错误
在函数函数Mp(a,b){..}中,以下代码行触发错误var e = a.getBoundingClientRect();
你会得到错误.
getBoundingClientRect(),一个返回容器位置的IE功能.问题可能与工具提示即信息窗口有关.
更多信息:http://ejohn.org/blog/getboundingclientrect-is-awesome/
尝试了解决方案:google.maps.event.clearListeners(window,'resize'); 它无济于事.
示例应用程序:https ://googledrive.com/host/0B-Y3wXhWdoQebnBUV2RNRWhJZE0/test-shell.html礼貌:@ user2250544
这是一个肮脏的黑客似乎有用,如果你有这样的事情:
HTMLElement.prototype.getBoundingClientRect = (function () {
var oldGetBoundingClientRect = HTMLElement.prototype.getBoundingClientRect;
return function() {
try {
return oldGetBoundingClientRect.apply(this, arguments);
} catch (e) {
return {
left: '',
right: '',
top: '',
bottom: ''
};
}
};
})();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2925 次 |
| 最近记录: |