Places UI Kit: A ready-to-use library that provides room for customization and low-code development. Try it out, and share yourinput on your UI Kit experience.

Use embedded JSON style declarations

  • 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 ofMapTypeStyle objects defining the desired appearance, with thefeatureType,elementType, andstylers 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 thestyles property in theMapOptions object during map creation or by using theMap.setOptions method.

  • Create styled map types by setting the style array to aStyledMapType object, enabling the addition of custom map styles without impacting the default map types.

Select platform:AndroidiOSJavaScript

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

  • Default map.
  • Map types that a user can switch between within a single map frame.
If you want to update the same style across multiple apps, look intocloud customization, which is available in the Google Cloud console and requires amap ID. To avoid potential conflicts,do not combine cloud customization and hardcoded styling in the same app.Experimental: For a more comprehensive styling experience, you can instead useJSON styling with cloud-based maps styling, which offers a more extensive list of map features and greater customization options. The cloud-based maps styling JSON schema is not backward compatible with embedded JSON style declarations. This means that cloud-based maps styling JSON cannot be used directly in the Maps JavaScript API. However, you can import embedded JSON style declarations into the cloud-based maps styling JSON schema.

Specify styles to features

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

The array takes the following form:

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

For a list of all available values forfeatureType,elementType, andstylers, see theJSON style reference.

Maps Platform Styling Wizard

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

Note: To have a style apply to multiple app platforms, consider usingcloud-based maps styling. If you want to use a JSONstyle, you can import it. For details, seeImport a JSON map style.

Apply styles to a default map

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

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

  • Creating your map.
  • Or, when calling theMap.setOptions method.

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 calledStyled Map in the control atthe top left of the map. To see the code sample, go toStyled Map Types.

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

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

Last updated 2025-12-11 UTC.