Manage legacy map styles

A map Style is a set of customizations that can be associated with a map ID, which is referenced in app code to display the customized map.

While it isn't required to have a map ID before creating a style, you must associate it with a map ID and add the map ID to your app before you can use your style. This is the only point in the map style lifecycle where anyone needs to interact with the application code.

Published versus Draft styles

A published style is "live." Any maps that use the style display the published version of it. Draft versions of a style are works in progress and aren't displayed publicly in maps until they are published.

When you first create a new style, which includes duplicating an existing style or style version, or importing a JSON style, that first instance of the new style is automatically published.

Create a style

Create a map style using one of these methods:

  • Creating a new style, either using default Google Map styles or based off of a suggested template.
  • Duplicating an existing style.
  • Duplicating a previous version of one of your existing styles.
  • Importing JSON styling.

Create a new style

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Click Create Style, and choose the Google Map radio button.
  3. Click Save.
  4. In the Save and Publish Map dialog, enter a map name and optional description, and click Save.

The style is automatically published, and you are taken to your new style's main page.

Duplicate an existing style

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Select one of your existing styles, and go to Duplicate.
  3. In the Duplicate Map Style dialog, enter a new map name and, if desired, a description.
  4. Click Save.

The style is automatically published, and you are taken to your new style's main page.

Duplicate a style version

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Select one of your existing styles, and click Customize Style.
  3. Select Settings > Version History.
  4. Select a style version, and click Duplicate at the bottom of the Version History pane.

The duplicated style is automatically published. At the bottom of the page is a small notification telling you that the style was duplicated and providing a link to open the newly duplicated style in a new tab.

The first style on your map is the original style version. Unlike other dated Draft or Published versions, it does not have any selectable child styles. To revert to this style or duplicate this style, select the dated heading.

Import JSON styling

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Click Create style.
  3. Under Create your own style, select the Import JSON radio button.
  4. Paste your valid JSON styling code into the field.
    • If your JSON is invalid, you see a notice in capital letters just below the JSON field.
    • If your JSON is valid, you see a preview of the pasted style, and the blue SAVE button is available.
  5. Select SAVE.

The style is automatically published, and you are taken to your new style's main page.

Restore a style version

If you want to use a previous version of a style, you can restore it. For example, if you created a branded map style to support a special event, when the event is finished you can restore the standard version of the map style.

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Select the style you want, and click Customize Style.
  3. Select Settings > Version History.
  4. Select the version you want to restore, and click Restore at the bottom of the Version History pane. The restored style becomes the most recent draft of the style.
  5. Close the "Version History" pane, and click Publish.

Update style details

Once you've created a map style, you can edit, duplicate, rename, delete, or add map IDs to it using the options at the top of the style's main page.

A screenshot of the main page for a single map style, showing the name of the map, the controls to customize or rename or duplicate or delete a style, a picture showing the style applied to a mapped area, and a notice saying that there are no map IDs associated with this style and a button labeled 'Add Map IDs'.

  • Continue customizing or view style details by selecting Customize style.
  • Rename or edit a description for the style by selecting Edit.
  • Duplicate the style by selecting Duplicate.
  • Delete the style by selecting Delete.
  • Add or view map IDs associated with the style.

Associate or remove map IDs on your style

Styles can be associated with multiple map IDs, since the same style can be applied across multiple Google Maps apps. However, each map ID may be associated with only one style.

  1. On the Map Styles page, select a style.
  2. Select either the Add Map IDs button (for styles with no associated map IDs) or the pencil icon (for styles that already have at least one associated map ID.) This opens the Add / Edit Map IDs pane.
  3. Check the box next to a map ID to associate with this style, or uncheck a checked box to remove the association.
  4. Select Save.

To use your Cloud-based map style, add the map ID to your app.