简体   繁体   English

所有Google Maps API V3库的404找不到错误

[英]404 Not Found error for all the Google Maps API V3 libraries

I am getting 404 Not Found error for all the Google Maps API libraries. 我收到所有Google Maps API库的404 Not Found错误。

eg https://maps-api-ssl.google.com/maps-api-v3/api/js/21/9/main.js 例如https://maps-api-ssl.google.com/maps-api-v3/api/js/21/9/main.js

The map works, when I build it through code but map does not load when I access the hosted website. 当我通过代码构建地图时,该地图有效,但是当我访问托管网站时,地图未加载。

You should no longer use https://maps-api-ssl.google.com to access the API. 您不应再使用https://maps-api-ssl.google.com来访问API。 See this blog post 看到这篇博客文章

Switch to googleapis.com 切换到googleapis.com

The eagle eyed amongst you may have spotted that we have updated all of our documentation to recommend that the Maps APIs be loaded from maps.googleapis.com rather than maps.google.com or maps-api-ssl.google.com . 您可能会发现老鹰眼已经发现, 我们已经更新了所有文档,建议您从maps.googleapis.com而不是maps.google.com或maps-api-ssl.google.com加载Maps API When loaded from maps.googleapis.com, the current implementation of the Maps API v3 does not rely on the exchange of cookies with Google. 从maps.googleapis.com加载时,Maps API v3的当前实现不依赖与Google交换Cookie。 This improves both the security of the API, and the performance on bandwidth constrained networks. 这样既提高了API的安全性,又提高了带宽受限网络的性能。 We therefore recommend all sites switch to using maps.googleapis.com. 因此,我们建议所有网站都改用maps.googleapis.com。

It looks like a certificate problem, try to access without https. 看来是证书问题,请尝试在不使用https的情况下进行访问。

http://maps-api-ssl.google.com/maps-api-v3/api/js/21/9/main.js http://maps-api-ssl.google.com/maps-api-v3/api/js/21/9/main.js

You can find more information about how get access with https in this answer: https://stackoverflow.com/a/3756468/1845971 您可以在以下答案中找到有关如何通过https访问的更多信息: https : //stackoverflow.com/a/3756468/1845971

Regards. 问候。

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

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