Hide
Google Maps Engine API (Deprecated)

Getting Started

Introduction

Welcome to the getting-started guide for the Google Maps Engine API.

Google Maps Engine provides a means to store geographic data and to layer that data on top of the Google base map. The data can consist of vector and/or raster (imagery) files.

The API provides full functionality for uploading the data into Google Maps Engine, for processing and maintaining the data, and for associating the data with the Google Maps Engine components that interact with the Google map.

In order to use the Google Maps Engine API to retrieve datasets that are under access control, you must have an active Google Maps Engine account. You may retrieve public datasets without a Google Maps Engine account. See the documentation on authentication and access control for details.

Create a Google account

You need a Google account in order to create a project in the Google APIs Console. Create a new Google Account or use your existing account. You may also want a separate Google Account for testing purposes.

Create a project on the Google APIs Console

Before you can send requests to the Google Maps Engine API, you need to tell Google about your client and activate access to the API. Use the Google APIs Console to create a project, which is a named collection of settings and API access information.

To create a project:

  1. Go to the Google APIs Console. If you aren't already signed in, enter your Google account information.
  2. If prompted to read the terms of service, follow the directions to accept the terms if you're happy with them.
  3. If you see a prominent Create project button, click it to create a new project. If you immediately see the Google APIs Console instead of the button, then you already have a project. You can use the project drop-down near the top left of the window to select or create a different project.

Activate the API

To activate the Google Maps Engine API:

  1. Go to the Google APIs Console. If you aren't already signed in, enter your Google account information.
  2. Click Services in the left-hand menu of the Google APIs Console.
  3. Scroll down to the Google Maps Engine API entry and click the switch to ON to activate the API.

Retrieve your API key

Every request to the Google Maps Engine API should contain a key parameter, whose value is an API key for your project obtained from the Google APIs Console. This key ties your application to your available quota. (If you pass an OAuth 2.0 authorization token with your requests, you can optionally omit the API key. There's more about OAuth 2.0 below.)

To get your API key:

  1. Go to the Google APIs Console. If you aren't already signed in, enter your Google account information.
  2. Select your project from the drop-down below the Google APIs logo.
  3. Click API Access.
  4. Your key is listed in the Simple API Access section. If no key is listed, click the appropriate option to create a new key.
    • If your application is server-side, use the key for server apps which allows you to restrict use of the key by locking it to certain IP addresses.
    • If your application is client-side, use the key for browser apps which allows you to restrict use of the key by locking it to certain referers.
    • For mobile apps, the recommended approach is to proxy your requests through a hosted server/application and use the key for server apps, which allows you to restrict use of the key by locking it to certain IP addresses.

Get an OAuth 2.0 client ID

If your app accesses protected data (that is, non-public data) you also need an OAuth 2.0 client ID, so that users can authorise the app to act on their behalf when adding data to Google Maps Engine.

Choose the type of client ID based on your app's requirements, as described in the authentication overview.

Try an HTTP request to access a public dataset

The Google Maps Engine API is accessed using HTTP requests to a base URL combined with operation-specific paths and parameters.

As stated above, data that is made public in Google Maps Engine is accessible via the API without authentication. Only an API key is required. The following request points to a publicly-accessible datasource in Google Maps Engine:

  https://www.googleapis.com/mapsengine/v1/tables/12421761926155747447-06672618218968397709/features
  ?maxResults=500
  &version=published
  &key={API_KEY}

You can send the above sample request from your browser, with a pre-filled API key that works only from this documentation site. Try it now.

Alternatively, copy the request URL without an API key and replace {API_KEY} with your API key. (That is the key for browser apps available for your project in the Google APIs Console. See the section on API keys above.) Then paste the URL into your browser's address bar.

Get to know the API

The conceptual overview describes the data components and important concepts in Google Maps Engine.

The workflow overview introduces the common methods of uploading data via the Google Maps Engine API and sharing the data on a map.

Follow these tutorials for a quick-start guide to the primary workflows: