错误:Google Maps API错误:MissingKeyMapError [英] ERROR: Google Maps API error: MissingKeyMapError
问题描述
以下JavaScript错误突然出现:
Google Maps API错误:Google Maps API错误:MissingKeyMapError
是的。 现在Google希望使用API密钥来验证用户访问其API的功能。。
您可以从以下链接获取API密钥。通过链接,你需要输入一个项目等等。但这很容易。无忧无虑。
https:// developers.google.com/maps/documentation/javascript/get-api-key
获得API密钥后,请更改以前的
< script src =https://maps.googleapis.com/maps/api/js>< / script>
至
< script src =https://maps.googleapis.com/maps/api/js?libraries=places&key=your_api_key_here>< / script>
现在您的谷歌地图正在运行。如果您想知道经度和纬度输入到地图。只需固定你想要的位置并检查浏览器的URL。你可以看到那里的经度和纬度值。
new google.maps.LatLng(经度,纬度)
The following JavaScript error suddenly appeared:
Google Maps API error: Google Maps API error: MissingKeyMapError
Yes. Now Google wants an API key to authenticate users to access their APIs`.
You can get the API key from the following link. Go through the link and you need to enter a project and so on. But it is easy. Hassle free.
https://developers.google.com/maps/documentation/javascript/get-api-key
Once you get the API key change the previous
<script src="https://maps.googleapis.com/maps/api/js"></script>
to
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=your_api_key_here"></script>
Now your google map is in action. In case if you are wondering to get the longitude and latitude to input to Maps. Just pin the location you want and check the URL of the browser. You can see longitude and latitude values there. Just copy those values and paste it as follows.
new google.maps.LatLng(longitude ,latitude )
这篇关于错误:Google Maps API错误:MissingKeyMapError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!