【问题标题】:MarkerClusterer doesn't display icon in IE10MarkerClusterer 在 IE10 中不显示图标
【发布时间】:2013-05-10 09:18:26
【问题描述】:
【问题讨论】:
标签:
google-maps
google-maps-api-3
internet-explorer-10
markerclusterer
【解决方案2】:
我也遇到了同样的问题,你需要在页面的 head 部分中添加以下代码来强制浏览器进入 IE9 模式
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
如果您在 IFRAME 内显示地图,则必须将其添加到母版页。
n.b.您需要关闭并重新打开浏览器才能看到地图正常工作。
欲了解更多信息,请参阅this working example。
【解决方案3】:
我找到了解决此问题的另一个原因/解决方法。我正在使用我使用 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: '');
}
这个脚本不是我的,我在网上找到的。希望这可以帮助。干杯