Tutorial - Highlight a road network

This tutorial walks you through the steps to create and use a map style that highlights the road network:

  1. Create and publish a map style so it's available to use.

  2. Create and connect a map ID that lets you use your style in apps and websites.

  3. Add the map ID to your apps and websites so your apps use your map style.

Step 1: Create and publish a map style

Opt in to Preview Styling.

  1. Go to the Google Maps Platform, and select Map Styles. Select or create a project, if needed.

  2. Select Create Style.

  3. Select Opt In at the top to change to the new cloud styling preview.

    Opt in button

Style the Road network

  1. At the bottom of the page, select Open in Style Editor.

  2. Under Feature type, select Infrastructure, then Road network.

  3. On the panel that pops up on the right, under Polyline, then Fill color, select the color box.

  4. Choose a bright color. Changing the color automatically checks the Fill color box.

  5. Under Stroke weight, drag the slider to set the stroke weight to 5.

  6. On the map, zoom in and out to see the effect of your changes. Because you selected a map feature that is relatively high in the hierarchy, all road types underneath it have inherited your changes.

    Preview map style showing road network fill color changes

Save and publish your map style

  1. At the top right, select Save.

  2. In Save and publish map style, enter a name and, optionally, a description for your map style.

  3. Select Save. Your map style is saved and published.

    Save and publish page

Step 2: Create and connect a map ID

A map ID lets you use your map style on apps and websites. Your style change goes live when you publish, so no software or app updates are needed.

Create a map ID

  1. Still on the Google Maps Platform, and select Map Management.

  2. At the top, select Create Map ID.

    Create map ID button

  3. Add a name for your map ID, and optionally, a description.

  4. Select the map type for the map ID, depending on where you want to use your map style.

    Select a map type on the map ID page

  5. At the bottom of the page, select Save. Your map ID is created.

Connect the map ID to your map style

  1. Under Associated map style, select the map style you created above.

    Associate a map style with your map ID

  2. Select Save. Your map ID is now associated with your map style.

Step 3: Add the map ID to your apps or websites

Now that you have a map ID that is associated with a published map style, you can add it to your apps or websites and test to make sure it functions as expected.

For more information about adding a map ID, see Add the map ID to your map.

What's next

Here are some things you can try next:

  • Update a style. Make changes to your map style and publish it, and see the changes show up automatically in your apps and websites. If you want to test your changes before they go live, see Test map style updates.

  • Use the map feature hierarchy to efficiently get the styles you want. For example, you can style the high-level map feature Natural>Land, and all of the land map features under it inherit the styling. You can then do custom styling on just the child map features that you want to be different.