简体   繁体   English

Google Maps API未在iPad上加载

[英]Google Maps API Not Loading On iPad

I have a webpage that uses the Google Maps API to load a custom map. 我有一个网页,该网页使用Google Maps API加载自定义地图。 The map works on Windows and Mac in all major browsers, however it does not work on an iPad. 该地图可在所有主要浏览器的Windows和Mac上运行,但不适用于iPad。 I have tested it on Safari Mobile and Chrome Mobile and the same issue is happening. 我已经在Safari Mobile和Chrome Mobile上对其进行了测试,并且正在发生相同的问题。 Nothing shows up and I get the following error in the console: 什么都没有显示,并且在控制台中出现以下错误:

[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)

Any help on what this means would be greatly appreciated. 对此的任何帮助将不胜感激。 Thanks. 谢谢。

I figured out the issue was that we were using the HTTP protocol. 我发现问题是我们正在使用HTTP协议。 Using HTTPS protocol when issuing requests to the API fixed the issue on the iPad. 向API发出请求时使用HTTPS协议解决了iPad上的问题。

I had very same issue. 我有同样的问题。 But my case is just opposite to @dcod, where the development version of my app is http:// and hence I need to use http:// of maps.google.com. 但是我的情况与@dcod相反,在这里我的应用程序的开发版本为http://,因此我需要使用maps.google.com的http://。

I will update the behavior in the production where the app is going to be https:// 我将在应用程序将为https://的生产环境中更新行为

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM