如何获得谷歌地图API密钥 [英] How to get google maps api key

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

问题描述

如何获得谷歌Android地图API密钥,我看了就比较单一的文章,但没有成功。

How to get google maps api key for android, i have read more one articles but not success.

我看code的android如下:

i look code android as below:

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:apiKey="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    android:clickable="true" />

所以我的问题是如何从谷歌获得xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?
请给我一步一步的,谢谢。

So my question how to get xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx from google? Please give me step by step, thanks.

感谢。

推荐答案

在开始之前,你需要从谷歌的特定API密钥。最关键的是免费的,并要求来完成这个过程。

Before you start, you will need a specific API key from Google. The key is free, and are required to complete this process.

转到 HTTPS://$c$c.google.com/apis/console/ ,然后登录你的谷歌帐户。

Go to https://code.google.com/apis/console/, and log in with your Google Account.

下面将出现:

点击创建项目按钮。

在服务列表中,找到谷歌地图API第3版,点击关闭将其打开。

In the list of services, find Google Maps API v3, and click on "off" to turn it on.

在接下来的屏幕中,选中我同意......,并点击接受按钮。现在,您将看到下一个谷歌地图API v3中的按钮已更改为on。

In the next screen, check "I Agree..." and the click the "Accept" button. You will now see that the button next to Google Maps API v3 has changed to "on".

然后点击菜单中的API访问向左。它会问你创建一个OAuth 2.0客户端ID ......

Then click "API Access" in the menu to the left. It will ask you to "Create an OAuth 2.0 client id...".

在接下来的屏幕上,提供一个产品名称(例如:小样),上传图片(如果你愿意的话)作为项目的一个标志,然后单击下一步按钮。

In the next screen, provide a product name (e.g. "demo"), upload an image (if you want to) as a logo of your project, and click the "Next" button.

在接下来的屏幕中,选择应用程序类型(Web应用程序),并输入您的网址,然后点击创建客户端ID按钮。

In the next screen, choose Application type ("Web application"), and type in your web address, and then click the "Create Client Id" button.

在下一屏幕上,你有一个API密钥。

In the next screen, you have got an API key.

注:保存您的API密钥! (您需要为您的特定URL开发所有谷歌地图应用程序

Remark Note: Save your API key! (You will need it for all Google Maps applications you develop for the particular URL

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

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