A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/javascript/cloud-customization/map-styles-leg below:

Create and use map styles | Maps JavaScript API

Create and use map styles

Stay organized with collections Save and categorize content based on your preferences.

A map style is a set of visual customizations to map features that you associate with a map ID. You then reference the map ID in your application code to display the customized map.

You can create a map style before you have a map ID; however, to use the style, you must associate the style with a map ID. To use a map style, you must take all of these steps:

  1. Create and publish a map Style. For details, see Create a style and Publish a style.

  2. Create a map ID. For details, see Create a map ID.

  3. Associate the map style with a map ID. For details, see Associate a map ID to a map style.

  4. Add the map ID to your app to display your style. For details, see Add the map ID to your map.

Tip: Once the map ID is in your application code, you can change the map style without any changes in your application code, and your end users don't have to upgrade to see updated map styles. Instead, you edit the map style associated with the map ID, and changes show up in your application maps. Create a map style

Create a map style using one of these methods:

Create a new style Experimental feature.
  1. In the Google Cloud console, go to Map Styles, and select a project, if needed.

  2. In Map styles, click Create style.

  3. In the dialog, under the Google styles tab, select one of the following:

  4. (Optional) To apply the monochrome variation to your map style, select Monochrome.

  5. Select Customize to create a new untitled style.

  6. Select map features and change their style to create the map style you want.

    Map features with custom styles have a solid blue dot next to them. If you customize a child style, the parent style displays a blue circle. For more information on map style hierarchy, see Understand map style inheritance and hierarchy.

    Note: Not all styles appear at all zoom levels. For more information, see Style zoom levels.
  7. Click Save.

  8. In the Save and publish map style box, enter a name for your style and optionally a description, and click Save.

The style is automatically published, and you see your new style's main page.

Caution: Making style changes but not explicitly saving them creates Unsaved Changes in your map style's version history. These versions are lost when you close the browser tab or when your Cloud console session ends. Duplicate a style
  1. Go to Map Styles, and select a project, if needed.

  2. Select one of your existing styles.

  3. On the style page, click Duplicate.

  4. In the Duplicate Map Style box, enter a new map name and optionally a description.

  5. Click Save.

    The style is automatically published, and you can see your new style's main page. Associate it with a map ID to use it for your maps. For details, see Associate a map ID to a map style.

  6. If you want to modify the style, click Customize, make changes, and click Save.

Import a JSON map style

Alternatively, you can create a map style by using JSON. For information on which properties you can style using JSON, see the JSON style reference.

Important: Importing a JSON map style only creates light map styles.
  1. In the Google Cloud console, go to Map styles, and select a project, if needed.

  2. In Map styles, click Create style.

  3. In the dialog, select the JSON tab

  4. Paste your valid JSON styling code into the field.

  5. Click Customize.

  6. Select map features and review or change their style as needed to create the map style you want. Map features with custom styles have a solid blue dot next to them.

    Note: Not all styles appear at all zoom levels.
  7. Click Save.

  8. In the Save and publish map style box, enter a name for your style and optionally a description, and click Save.

The style is automatically published, and you see your new style's main page.

Publish a style

When you first create a new map style, which includes duplicating an existing style or importing a JSON style, that first instance of the new map style is automatically published. After that, you can save changes as a draft and then publish when you're happy with the changes.

  1. Make the changes to the map style or duplicated map style you want to publish. For details, see Change a style.

  2. While you're still making changes, click Save.

  3. When you're ready to publish and have your changes go live for any map IDs using that map style, click Save, and then click Publish.

Published versus Draft map styles

Published: A published map style is live. Any maps that use the map style display the published version of it.

Note: Style changes can take a few hours to propagate to your apps websites, and apps can take longer if the devices aren't connected to the internet. If you're still not seeing your style changes after a few hours, see My style changes aren't updating.

Draft: Draft versions of a map style are works in progress and aren't displayed in maps until you publish them.

Change a style

If you want to make changes to your map style, you can make the changes right in the style editor. You have a couple of choices when you update a style:

Once you've created a map style, you can make changes to it on the style's main page in any of the following ways:

Use data-driven styling and datasets Experimental feature.

In the style's main page, you can enable and view layers for data-driven styling for boundaries and data-driven styling for datasets on light map styles.

When you link a light map style that has data-driven styling or datasets enabled to a map ID, the enabled layers are also available for the science dark map style.

To use data-driven styling or datasets with a science dark map style, you must do the following in the Google Cloud console:

  1. Go to Map Styles and either select a light map style or create one.

  2. In the style main page, enable the your choice of layers on a light map style.

  3. Associate the light map style to the same map ID as the dark map style.

Associate your style to a map ID Experimental feature.

Associate your style to a map ID to display your custom style on your website and in your app. A map ID can have only one light style (roadmap type) and one science dark style (roadmap dark type) associated with it.

To change the associated style for a map ID, do the following in the Google Cloud console:

  1. Go to Map Management and select a map ID.

  2. In the Map styles section, click Change style for a light or dark map style.

    The panel displays only styles with a roadmap map type for light styles, and only styles with a science roadmap dark map type for dark styles.

  3. In the panel, select one of the styles to associate to this map ID.

  4. Click Done.

  5. Click Save to apply all changes.

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

Navigate on the preview map

You navigate on the preview map in the same way you navigate on any Google map:

Find map features

To find a map feature that you want to style, you can use the filter or the map inspector.

You can also expand and collapse map feature categories to find the map feature you want. Browse the list of map features at What you can style on a map.

Filter map features

To find map features using the filter, under Map Features, enter a term in the Filter box.

If you can't find a map feature:

Inspect map features

To find map features using the map inspector, perform the following steps:

  1. Left-click anywhere on the map to open the map inspector at your click point.

  2. Select a map feature in the map inspector to open it in the Map Features pane.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-10 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-10 UTC."],[[["Map styles are visual customizations applied to map features and are associated with a map ID for display in your application."],["To use a map style, you need to create and publish it, create a map ID, associate the style with the ID, and add the ID to your application."],["You can create a new map style from the default Google map style or duplicate and modify an existing style."],["Map styles can be published live or saved as drafts for testing and later publishing."],["You can change, duplicate, rename, delete, or associate/remove map IDs with your styles in the Google Cloud console."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4