Route with traffic monitoring

Dynamic route recalculation with live traffic updates

View on GitHub
SDK 1.0.0-rc.7

A Paris route stays on screen and replans itself once a minute, its live traffic delays redrawn from each fresh response.

  • calculateRoute accepts the route it already returned as its locations, so a replan follows the same path without restating the waypoints.
  • A CostModel of traffic: 'historical' holds that path steady while live delays keep drawing on it.
  • createLatestRequest retires a superseded tick, so the slower response cannot paint last.

Related examples