Using Map IDs

Map IDs are identifiers you create in the Google Cloud Console, associate with a style, then put into your app code to apply that style to your map.

Upon creation, Map IDs are associated with a project, and are also restricted to a single platform (Android, iOS, JavaScript) or to the Maps Static API.

To create or manage any Map IDs in your Cloud Console, you must have the Project Owner or Project Editor IAM role.

Creating a Map ID

A Map ID is a unique identifier that represents a single instance of a Google Map. You can create Map IDs and update a style associated with a Map ID at any time in the Cloud Console.

To create a Map ID:

  1. In the Cloud Console, go to the Maps Management page.
  2. Select Create New Map ID to display the Create New Map ID form.
    Create New Map ID

    In the form, do the following:

    • Specify a map name.
    • Specify a map type or platform.
    • For JavaScript maps, choose raster or vector map type.
    • Enter a description of the map.
    • Select Next to display the new Map ID.

Associating a Map ID to a map style

These instructions assume that there is at least one existing map style in your project.

  1. In the Cloud Console, go to the Maps Management page.
  2. On this page, select an existing Map ID from the Map name column.
  3. At the bottom of this form, choose a map style from the Map styles associated with this Map ID dropdown.
  4. Select Save.
    Screenshot showing the details page for a single Map ID, including the dropdown field that lets users associate a map style with this Map ID.

Adding a Map ID to your app

To add a Map ID to a new or existing map that uses one of our web-service APIs, append the map_id URL parameter and set it to your Map ID. This example shows adding a Map ID to a map using Maps Static API.

<img src="https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Clabel:C%7C40.718217,-73.998284&key=AIzaSyA3kg7YWugGl1lTXmAmaBGPNhDW9pEh5bo&map_id=8f348d1b5a61d4bb" />