我在我的 WordPress 项目的前端和管理中使用谷歌地图 v3。 (现在在我本地)
1. Front end shows the maps in the simplest way.
2. Admin lets the user click the map and define office location.
我将 javascript 文件保存到本地(如果这可能是问题所在)。
wp_enqueue_script( 'gmaps', get_template_directory_uri() . '/assets/js/gmaps/gmaps.js', array(), '1.0.0' );
昨天、今天一切都工作良好:
1. Admin all gone, it sayes "403 forbidden" for all maps.
2. Front end shows maps but outputs many errors...
GET https://maps.googleapis.com/maps/api/js/StaticMapService.GetMapImage?1m2&1i…
003640&2e1&3u19&4m2&1u400&2u250&5m5&1e0&5sen-GB&6sus&10b1&12b1&token=69746 403 (Forbidden) main.js:44
很多这样的错误最初以及缩放和点击之后,都指向第 44 行。
我不可能达到“每日25000限制”。
会出现什么问题吗?我应该使用 api-key 吗?
感谢您的审阅。
最佳答案
Google map 在本地主机上运行时存在一些问题,API 文档中有/应该有注释
关于javascript - 谷歌地图导致本地403禁止,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25454476/