googlemaps / googlemaps/extended-component-library

<gmp-map> does not support Dark Google Maps Cloud Styles

Open
#297 0 comments 1 reaction 0 assignees View on GitHub
triage me type: feature request
Dominant language
TypeScript
Stars
192
Forks
22
Avg merge
2d 23h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**

`` elements and MapElement class do not support setting color scheme. So it is impossible to set it to DARK or FOLLOW_SYSTEM. It can only be set on the Map instance on initialization through MapOptions. Since MapElement creates the innerMap, the api provides no way to set the MapOptions before it is initiliazed or have MapElement pass it a color scheme option.

This means the developer that wants to support DARK and FOLLOW_SYSTEM mode can not use the `gmp-map` web component, and must resort to using the `Map` class.

**Describe the solution you'd like**
Provide an attribute on `gmp-map` or prop on MapElement to set the colorScheme option.

**Describe alternatives you've considered**
There are no alternatives. Its either you use the legacy pattern and support Dark Mode, or use the modern pattern and only support light mode.

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.