Multiple maps: four themes per style

Four maps of Amsterdam moving together, with four colour themes for each standard style, in a grid that fits any screen

View on GitHub
SDK 1.0.0

Pick a standard style and all four maps switch to it, each in its own theme. Pan or zoom any of them and the other three follow, so the themes compare street for street.

  • Each theme is a set of map colours passed to applyConfig, which replaces the whole config, so the colours a theme leaves out go back to the style’s own. The mono themes set land alone and the style derives the other nine from it. The satellite themes recolour only the roads and labels drawn over the imagery.
  • The themes are set before setStyle, so they carry into the new style with the rest of the map’s state.
  • Each map’s camera is on mapLibreMap, and one move handler per map copies it to the other three with jumpTo.

Related examples