Traffic incident focus

Bring a city's traffic incidents forward and push the rest of the map back, with one switch

View on GitHub
SDK 1.0.0

One switch brings London’s incidents and boundary forward and pushes traffic flow, POIs and road labels back. Switch it off and every layer returns to its default.

  • Traffic flow fades through its own opacityFactor.
  • styling.layers.query selects the style’s layers by group, pois included, so one call fades a whole module’s layers and reset undoes it.
  • Those queries reach only the style’s own layers. The incidents and the boundary take theirs through each module’s layers config, set with updateConfig and merged over the defaults rather than replacing them.

Related examples