【问题标题】:Google Map not displaying at all in IE10谷歌地图在 IE10 中根本不显示
【发布时间】:2014-05-23 17:51:12
【问题描述】:

当前的webpage 在IE10 下根本不显示gmap,但所有其他浏览器都能正常显示。有人可以指导我完成一个可能的解决方案吗?

我试过了 META http-equiv=X-UA-兼容内容=IE=9 和 META http-equiv=X-UA-兼容内容=IE=edge

没有成功! 我目前正在为网站和 gmap 模块使用 drupal 7。

感谢回复

【问题讨论】:

  • 检查您的 console.log 是否有警告:Control is no longer supported in the Google Maps Javascript API v2. Please visit https://developers.google.com/maps/documentation/javascript/v2/v2tov3 to migrate your application to v3. %7Bmain,adsense,geometry,zombie%7D.js:70 Map.addControl is no longer supported in the Google Maps Javascript API v2. Please visit https://developers.google.com/maps/documentation/javascript/v2/v2tov3 to migrate your application to v3.
  • 感谢您对安托的宝贵意见!我将尝试使用 google map Api key V3,希望它能解决问题!

标签: google-maps internet-explorer drupal-7


【解决方案1】:

我已经确定了你的错误为什么它会给出这个错误是因为你已经设置了这个元标记 <meta http-equiv="X-UA-Compatible" content="IE=8">

根据 IE10 浏览器标准模式和其他浏览器版本 IE8 标准,不支持控制台的跟随方法

Console.log();
Console.info();
Console.warn();

但是,如果你可以将 IE 模式设置为 9 就可以了。

在 IE10 版本中有 4 种不同的方法可用,其中使用Console.dir() 而不是上面的 3 个。

在你的 Javascript 文件中给出这个错误:

"SCRIPT438: Object doesn't support property or method 'warn' Bmain,adsense,geometry,zombie.js, line 70 character 35".

在这种情况下,您无法更改 javascript,因为它是从 Google CDN 加载的。

因此,您可以将以下内容添加到您的 HTML 中,这将帮助您将文档标准模式更改为 IE=9。 <meta http-equiv="X-UA-Compatible" content="IE=8">

参考:http://msdn.microsoft.com/en-us/library/ie/jj819729(v=vs.85).aspx

【讨论】:

  • Ashwin 你能告诉我如何在 drupal 7 中更改 content="IE=9" 吗?感谢您的回复
  • 以下代码示例演示了如何强制网页以 Internet Explorer 9 模式呈现。 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
猜你喜欢
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多