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

styleUse it for
siemensSand & Petrol by day, Deep Blue by night. The default.
minimalQuiet colors for maps that carry their own data.
contrastEvery label at 7:1 contrast or more.
boldStrong 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.

JavaScript
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

https://maps.siemens-cdn.com/maps/embed/v1/place?q=49.57288,11.00253&zoom=15

style=siemens (default), colorScheme=auto (default)Open this map on its own
HTML
<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

NameRequiredValuesNotes
stylenosiemens, minimal, contrast, boldNot 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.
colorSchemenoauto, light, darkNot 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=siemens with colorScheme=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, so auto renders light there.
  • Labels are Noto Sans in every style.

Sample with every variant: Map styles, light and dark. All parameters: embed URL reference.