Waypoints

Demonstrate waypoint management with different routing scenarios

View on GitHub
SDK 1.0.0-rc.7

The dropdown swaps between lists of waypoints, and each waypoint is drawn for the role its position gives it: arrow for the origin, flag for the destination, numbers in between.

  • A Waypoint is a plain GeoJSON point feature, so a geocodeOne result and one written out by hand go into the same list.
  • PlanningWaypoint admits null in that list, so a list with no origin or no destination needs no second array shape.
  • showWaypoints stands on its own. It draws the waypoints and their labels with no route calculation behind them.

Related examples