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/mapcolorscheme below:

Map color scheme | Maps JavaScript API

Map color scheme

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

For maps of type roadmap and terrain, you can set the map color scheme (dark, light, or current system setting) by using google.maps.colorScheme. The colorScheme option can only be set when the map is initialized; setting this option after the map is created will have no effect.

Roadmap

The following image shows the light mode and dark mode color schemes for the roadmap type.

Terrain

The following image shows the light mode and dark mode color schemes for the terrain type.

By default, the map uses light mode. When creating the map, import ColorScheme and specify the map color scheme (LIGHT, DARK, or FOLLOW_SYSTEM) in map options, as shown here.

const {ColorScheme} = await google.maps.importLibrary("core")

const mapOptions = {
  center: { lat: -34.397, lng: 150.644 },
  zoom: 8,
  colorScheme: ColorScheme.DARK,
}
map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);

If you reset the options after the map is instantiated, colorScheme has no effect.

To create custom light styles and dark styles for your roadmap map types, use cloud-based maps styling.

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-08-14 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-08-14 UTC."],[[["Roadmap and terrain map types allow customization of color schemes (light, dark, or system default) using `google.maps.colorScheme`."],["The `colorScheme` option must be set during map initialization and cannot be changed afterward."],["By default, maps use light mode; to change, import `ColorScheme` and specify the desired scheme (LIGHT, DARK, or FOLLOW_SYSTEM) within map options."],["Custom styles using Map IDs are only compatible with the light color scheme for roadmap map types."]]],[]]


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