简体   繁体   中英

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.

eg 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. See this blog post

Switch to 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 . When loaded from maps.googleapis.com, the current implementation of the Maps API v3 does not rely on the exchange of cookies with Google. This improves both the security of the API, and the performance on bandwidth constrained networks. We therefore recommend all sites switch to using maps.googleapis.com.

It looks like a certificate problem, try to access without https.

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

Regards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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