回答

1

我有同样的问题,你需要将下面的代码添加到页面的头部内到浏览器强行进入IE9模式

<meta http-equiv="X-UA-Compatible" content="IE=9"/> 

如果要显示IFRAME里面的地图,那么它必须被添加到母版页。

n.b.您需要关闭并重新打开浏览器才能看到地图正常工作。

欲了解更多信息,请参阅this working example

2

强制浏览器进入IE9模式是不好的做法 - 特别是因为MarkerClusterer。相反,从这个修改线路956(https://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/markerclusterer/src/markerclusterer.js?r=110#956)代码:

if (document.all) { 
    style.push('filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(' + 'sizingMethod=scale,src="' + this.url_ + '");'); 
} else { 
    style.push('background:url(' + this.url_ + ');'); 
} 

要这样:

style.push('background:url(' + this.url_ + ');'); 
1

我发现了另一个原因/解决此问题。我正在使用JavaScript的window.location.origin引用地图标记的图像。 Internet Explorer(IE)10或更低版本无法访问此对象,从而导致路径“未定义”对象。

解决方案:避免使用window.location.origin对象。使用相对路径或以下脚本:

if (!window.location.origin) { 
     window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); 
    } 

此脚本不是我的,我在互联网上找到它。希望这可以帮助。干杯