Traffic flow playground

Filter live traffic flow by road category, and click a road for its speed and closure readings.

View on GitHub
SDK 1.0.0-rc.7

Untick a road category and the flow colouring leaves those roads. Click any coloured road for its speed and closure readings.

  • TrafficFlowModule.get with { visible: true } colours the roads as the module resolves.
  • events.on('click', …) delivers the clicked segment as a typed TrafficFlowModuleFeature, with relativeSpeed and roadClosure already on properties.
  • filters, given to updateConfig, applies a roadCategories clause to layers the style already draws, so nothing is re-fetched, and filters: undefined drops the filter again.

Related examples