【问题标题】:Google Maps API Not Loading On iPadGoogle Maps API 未在 iPad 上加载
【发布时间】:2015-07-28 14:56:06
【问题描述】:

我有一个使用 Google Maps API 加载自定义地图的网页。该地图适用于所有主要浏览器的 Windows 和 Mac,但不适用于 iPad。我已经在 Safari Mobile 和 Chrome Mobile 上测试过,同样的问题正在发生。什么都没有显示,我在控制台中收到以下错误:

[Error] Failed to load resource: The certificate for this server is invalid. 
You might be connecting to a server that is pretending to be “maps.gstatic.com” 
which could put your confidential information at risk. (main.js, line 0)

任何有关这意味着什么的帮助将不胜感激。谢谢。

【问题讨论】:

    标签: javascript html ios google-maps ipad


    【解决方案1】:

    我发现问题在于我们使用的是 HTTP 协议。在向 API 发出请求时使用 HTTPS 协议修复了 iPad 上的问题。

    【讨论】:

      【解决方案2】:

      我也有同样的问题。但我的情况与@dcod 正好相反,我的应用程序的开发版本是http://,因此我需要使用maps.google.com 的http://。

      我将更新应用程序在生产环境中的行为 https://

      【讨论】:

        猜你喜欢
        • 2017-04-10
        • 2013-03-19
        • 1970-01-01
        • 2020-10-28
        • 1970-01-01
        • 2018-09-02
        • 1970-01-01
        • 2019-07-08
        • 1970-01-01
        相关资源
        最近更新 更多