Using Cloud-based maps styling

The following instructions show how to use the Google Cloud Console to create, customize, publish, and manage your maps at any time using Map IDs and Map Style.

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

Before you begin

Creating map styles

A Map Style is a unique identifier for a set of customizations that can be associated with any Map ID.

To create a new style:

  1. In the Google Cloud Console, go to the Map Styles page.
  2. Select Create New Map Style to open the New Map Style page.
  3. In the New Map Style page, choose one of the following options:
    1. Select a Map Style from one of the available style variations.
    2. Import JSON styling code by pasting your JSON code into the text box on the Import JSON tab.
    3. Select a Map Style customized to emphasize the goals of a specific industry, such as Travel, Logistics, Real Estate, and Retail.

    You can specify additional customizations to map features by clicking Customize in Style Editor. For more information, see Using the style editor.

  4. To name your Map Style and save your changes, select Save.

Updating style details

On the Map Styles page, select a Map Style to complete the following actions:

  • Continue customizing or view style details in the Style Editor by selecting Customize style. For more information, see Using the style editor.
  • Rename or edit a description for the style by selecting Edit.
  • Duplicate the style by selecting Duplicate.
  • Delete the style by selecting Delete.
  • View Map IDs associated with the style.

Styles created before September 15, 2020 will not display Google Maps enhanced natural features. To use Google Maps enhanced natural features support for your map styling, you must create a Map Style.

Example app

Optional Cloud Styling CocoaPod or GitHub demo

Instead of starting from scratch, you can try out our Cloud-based maps styling demo, which is installed by following the instructions in the Using the Google Maps Beta CocoaPod section.

Alternatively, you can find an Objective-C sample application that demonstrates how to style your iOS map from the cloud here.

Building the Beta demo app

In Xcode, press the compile button to build and then run the current scheme. The build produces an error, prompting you to enter your API key in the SDKDemoAPIKey.h file.

If you don't yet have an API key, follow these instructions to set up a project on the Cloud Console and get an API key. When configuring the key on the Cloud Console, you can specify your app's bundle identifier to ensure that only your app can use the key. The default bundle identifier of the SDK samples app is com.example.GoogleMapsDemos.

Edit the SDKDemoAPIKey.h file and paste your API key into the definition of the kAPIKey constant:

static NSString *const kAPIKey = @"YOUR_API_KEY";

If Xcode prompts you to unlock the SDKDemoAPIKey.h file for editing, choose Unlock.

Remove the following line:

#error Register for API Key and insert here.

Build and run the project.

Cloud-based maps styling map demo

The CloudStyling demo shows how to style the map by using a style set on Google Cloud Console.

When the demo application launches, click on the Map Customization demo in the Beta Samples section at the top of the list.

Click on Style Map to see the effect of loading different Map IDs.

You can try adding your own style as well ("Style Map" > "Add a new Map ID"), and see the map update with your custom styled map.