Routing Composite

Chain four routing services into one map: geocode the stops, plan a route with a pause, search along it, and show what is reachable from the destination.

View on GitHub
SDK 1.0.0-rc.7

Three place names become a route with a half-hour pause, the chargers and rest areas beside it, and the area still reachable once you arrive. Four services run in a row, with nothing reshaped between them.

  • geocodeOne returns waypoints in the shape calculateRoute already takes, so the first hop needs no adapter.
  • discoverPlaces accepts the route feature itself, so “chargers within a five-minute detour” is a query rather than a post-filter.
  • LegSummary.stopTimeInSeconds is derived from the gap between one leg’s arrival and the next leg’s departure. The API has no wait-time field, so this derived value is what lets the panel show the time spent at the pause.
  • ReachableRangesModule takes the range straight from the service and titles it from its budget, since a reachable range is an area rather than a route.

Related examples