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/json-styling-overview below:

Use embedded JSON style declarations | Maps JavaScript API

Use embedded JSON style declarations

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

You can apply customized styling through an embedded JSON style declarations to the following:

If you want to update the same style across multiple apps, look into cloud customization, which is available in the Google Cloud console and requires a map ID. To avoid potential conflicts, do not combine cloud customization and hardcoded styling in the same app. Specify styles to features

To apply styles to different features and elements in a map, create an array of MapTypeStyle objects that define how the map should be styled.

The array takes the following form:

var stylesArray = [
  {
    featureType: '',
    elementType: '',
    stylers: [
      {color: ''},
      {visibility: ''},
      // Add any stylers you need.
    ]
  },
  {
    featureType: '',
    // Add the stylers you need.
  }
]

For a list of all available values for featureType, elementType, and stylers, see the JSON style reference.

Maps Platform Styling Wizard

Use the Maps Platform Styling Wizard as a quick way to generate a JSON styling object.

Note: To have a style apply to multiple app platforms, consider using cloud-based maps styling. If you want to use a JSON style, you can import it. For details, see Import a JSON map style. Apply styles to a default map

The following shows an example default map styled using light-colored text and icons on a dark background (i.e. dark mode). To see the code sample, go to Styled Maps - Night Mode code sample.

To modify the styles of the default map, set the map's styles property in the MapOptions object to your style array when:

Changes to labels and roads affect all map types including terrain, satellite, hybrid, and default roadmap types.

Apply styles to a map type

The following shows an added map type called Styled Map in the control at the top left of the map. To see the code sample, go to Styled Map Types.

To create a styled map type, set the style array to a StyledMapType object. Creating a new styled map type does not affect the style of the default map types.

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-09 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-09 UTC."],[[["Customize the appearance of your maps using embedded JSON style declarations for the default map and selectable map types."],["Style features and elements within the map by creating an array of `MapTypeStyle` objects defining the desired appearance, with the `featureType`, `elementType`, and `stylers` properties determining specific modifications."],["Utilize the Maps Platform Styling Wizard to quickly generate JSON styling objects, simplifying the process of creating custom map styles."],["Apply styles to the default map by setting the `styles` property in the `MapOptions` object during map creation or by using the `Map.setOptions` method."],["Create styled map types by setting the style array to a `StyledMapType` object, enabling the addition of custom map styles without impacting the default map types."]]],["Custom styling for maps can be applied via embedded JSON style declarations to default maps or user-switchable map types. Create an array of `MapTypeStyle` objects specifying `featureType`, `elementType`, and `stylers` to define styling. For consistent styling across apps, use cloud customization with a map ID. Use the Maps Platform Styling Wizard to quickly generate JSON styling or apply styles by setting the map's `styles` property within the `MapOptions` object or the `Map.setOptions` method.\n"]]


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