Route with waypoints

Basic routing with multiple waypoints

View on GitHub
SDK 1.0.0-rc.7

Four New York addresses become one route across the city, with numbered stop pins and a summary bubble on the line.

  • geocodeOne returns a single Waypoint per address, which calculateRoute takes as a location unchanged.
  • bboxFromGeoJSON turns those waypoints into map bounds, so the opening view needs no hand-picked centre or zoom.
  • RoutingModule.showRoutes and showWaypoints render the line, pins and summary from the response as it arrives, with one call each.

Related examples