Styles and dark mode
Four Siemens styles, each in light and dark. Pick one with style, and let colorScheme follow the visitor’s light or dark setting or fix it to match your section.
The four styles
| style | Use it for |
|---|---|
siemens | Sand & Petrol by day, Deep Blue by night. The default. |
minimal | Quiet colors for maps that carry their own data. |
contrast | Every label at 7:1 contrast or more. |
bold | Strong colors for showcases and hero maps. |
colorScheme=auto (the default, and the recommended setting) follows the visitor and switches live. light and dark fix it. Short forms like style=siemens-dark set both. See also dark and light host pages.
Pages with their own theme switch
A page that has its own light and dark switch, like these docs, tells every colorScheme=auto map which scheme it shows. Send the message to the iframe after it loads and again on every switch; auto hands the choice back to the visitor’s setting. A map with colorScheme=light or dark in its URL ignores it.
const frame = document.querySelector('iframe');
const tell = (scheme) =>
frame.contentWindow.postMessage({ type: 'siemens-maps:color-scheme', scheme }, 'https://maps.siemens-cdn.com');
frame.addEventListener('load', () => tell(myTheme())); // 'light', 'dark' or 'auto'
myThemeSwitch.addEventListener('change', () => tell(myTheme()));
The web component takes the same values in its color-scheme attribute; set it on every switch.
Try it
style=siemens (default), colorScheme=auto (default)Open this map on its own<iframe
src="https://maps.siemens-cdn.com/maps/embed/v1/place?q=49.57288,11.00253&zoom=15"
title="Erlangen, style switcher"
width="600"
height="450"
style="border:0"
loading="lazy"
allowfullscreen
referrerpolicy="no-referrer-when-downgrade"></iframe>
Parameters
| Name | Required | Values | Notes |
|---|---|---|---|
style | no | siemens, minimal, contrast, bold | Not in Google’s embed. siemens (default) is Sand & Petrol by day and Deep Blue by night; minimal is quiet for maps that carry their own data; contrast keeps every label at 7:1 or more; bold is for showcases. Short forms like siemens-dark set the scheme too. Unknown values show siemens. |
colorScheme | no | auto, light, dark | Not in Google’s embed. auto (default) follows the visitor’s light or dark setting and switches live; light and dark fix it, for example to match your section. |
Good to know
- Google’s Embed API has neither parameter. Migrated URLs keep working unchanged and get
style=siemenswithcolorScheme=auto. - The place card, buttons, controls and attribution take the style’s colors too. Every label and button meets WCAG 2.2 contrast, the contrast style 7:1.
- The same names work on the Static Maps API:
/maps/api/staticmap?…&style=minimal&colorScheme=dark. A static image cannot follow the visitor, soautorenders light there. - Labels are Noto Sans in every style.
Sample with every variant: Map styles, light and dark. All parameters: embed URL reference.