谷歌地图api

Stay organized with collections Save and categorize content based on your preferences.

Explore top topics

Read the docs

Watch Google Maps Platform videos

Intro to Google Maps Platform

In this video, Angela Yu gives an overview of what's available through Google Maps Platform APIs and SDKs and shares some sample code for using them.

Learn with Codelabs

Twitter

Keep up-to-date on the latest news & tips from the Google Maps Platform team.

GitHub

Check out our open source utilities and example apps to help you build better and faster.

YouTube

Tutorials, tips, announcements, developer stories, and more.

Blog

All the latest in-depth news and stories from the world of Google Maps Platform.

Get help & support

Support

Get help from the Google Maps Platform team.

Let’s get started

Getting started with Google Maps Platform is fast and easy.

Create a billing account. Enable the features you want. Get an API key. Start building.

Learn more in our getting started docs and videos.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]

Stay organized with collections Save and categorize content based on your preferences.

Google Maps PlatformDocumentation

All the information you need to bring the real world to your web and mobile apps with
Google Maps Platform SDKs and APIs for Maps, Routes, and Places.

SDKs & APIs

Explore, learn, and build with comprehensive documentation, sample code, example apps, and more.

Get started

Learn the basics of using Google Maps Platform APIs & SDKs.

  • Getting started guide

    Create an account, generate an API key, enable APIs and SDKs, and start building.

    > Read the guide and get started fast

  • Build your first map

    New to Google Maps Platform? Build your first map with a marker.

    > Try it for JavaScript, Android, and iOS

  • Search for Places

    Learn how to query Google Maps Platform's comprehensive database of rich place data.

    > Try it with the Maps JavaScript API and Places API

Browse the docs for some of the most popular Google Maps Platform features.

Industry solutions

Check out the industry-specific solutions offered by Google Maps Platform.

Help & Support

Get help. Give help. Join the community.

Support

Get help from the Google Maps Platform team.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }] [{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]


开始学习本教程前,你需要拥有一个免费的 Google 地图 API key。


开始学习?

开始学习本教程前,你需要在Google上申请一个指定的API key。

通过以下步骤我们可以免费获取 API key 。

访问 https://code.google.com/apis/console/, 使用你的Google账号登陆。

登陆后会出现如下界面:

谷歌地图api

点击 "Create Project" 按钮。

在服务列表中找到 Google Maps API v3, 然后点击 "off"(关闭) 让其开启该服务器

在下一个步骤中,选择"I Agree..." 然后点击 "Accept" 按钮。 现在你在服务列表中应该就可以看到 Google Maps API v3 已经变为 "on"(开启)状态。

接着在左侧菜单中点击 "API Access" ,在右侧栏中将看到以下提示 "Create an OAuth 2.0 client id..."。

点击 "Create an OAuth 2.0 client id...",将弹出一个表单,表单需要你填入你的项目名称,项目图片或者logo,然后点击 "Next" 按钮。

然后,我们需要选择应用类型 ("Web application" :网站应用), 然后填写你的站点地址,之后点击 "Create Client Id" 按钮即可。

最后我们就可以得到我们需要的 API key,如下图所示:

谷歌地图api

谷歌地图api
注意: 保存你的API key! ( 在填写的指定 URL 中开发所有的 Google 地图应用你需要使用该API key)。