Style maps based on context

Select platform: Android iOS JavaScript Web Service

Two app screens showing map in dark to light mode

You can now use context to change a map style in your app. Create light, dark, and monochrome map styles to automatically switch styles in your apps without changing the map ID. When you create a map style, you can select from several base styles: light, dark, monochrome light, or monochrome dark. Choose the base style closest to your target style and then customize for your needs.

With a light and dark map style customized, you can then associate both with one map ID. When you use the map ID in your applications, the map style automatically switches between map styles when the map goes into light or dark mode.

To get started using light and dark map styles with map IDs, go to Create a new style and Associate your style to a map ID.