我如何获得Google Map Api v3密钥? [英] How can I Get Google Map Api v3 key?

查看:288
本文介绍了我如何获得Google Map Api v3密钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取Google Maps API v3密钥。我阅读了很多关于Google Map API V3的教程,但是当转到Google API控制台和服务时,我没有获得此API。然而,谷歌地图JavaScript API V3是在那里,但它提供的客户端ID不是API密钥。




请引导我如何获取它?

此链接?



  • 访问API控制台 https://code.google.com/apis/console 并使用您的Google帐户登录。

  • 点击左侧菜单中的服务链接。

  • 激活Google Maps API v3服务。

  • 点击左侧的API访问链接手动菜单。您的API密钥可从API访问页面的简单API访问部分获得。 Maps API应用程序使用Key for browser应用程序。


然后,您必须在您的网页中使用它与

 < script async defer src =https://maps.googleapis.com/maps/api/js?key = YOUR_API_KEY&安培;回调= initMap> 





并将 YOUR_API_KEY 通过您刚刚生成的API密钥。
这里, initMap 是GoogleMaps完全加载后执行的方法的名称;您可以根据需要删除或重命名此参数。


您是否经历过这个循序渐进的问题?它为我工作。


I'm trying to get the Google Maps API v3 key. I read a lot of tutorials all are about Google Map API V3 but when go to Google API console and in services I did not get this API. However, Google Map javascript API V3 is lies there but it gives the client ID not the API key.

Kindly guide me how can i get it?

解决方案

Have you seen this link ?

  • Visit the APIs Console at https://code.google.com/apis/console and log in with your Google Account.
  • Click the Services link from the left-hand menu.
  • Activate the Google Maps API v3 service.
  • Click the API Access link from the left-hand menu. Your API key is available from the API Access page, in the Simple API Access section. Maps API applications use the Key for browser apps.

Then you have to use it in your webpages with

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap">

And replace YOUR_API_KEY by the API key you just generated. Here, initMap is the name of the method executed once GoogleMaps is fully loaded ; you can remove or rename this parameter depending what you need

Do you experience any issue with this step-by-step ? It worked for me.

这篇关于我如何获得Google Map Api v3密钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆