Along route search service NodeJS

Find fast chargers within a one-minute detour of a route, from a Node.js process

SDK 1.0.0-rc.7

Amsterdam and Utrecht are geocoded and routed, and the high-power charging stations within a short detour of that route print to the console, each with the time and distance its detour adds.

  • geocodeOne returns one Waypoint per name, so calculateRoute takes them directly, with no result list to pick through.
  • discoverPlaces accepts the route feature itself under route, making “along this line, within this detour” a query rather than a filter over wider results.
  • maxDetourTimeSeconds and filters.minPowerKW narrow the set at the service before anything is returned.
  • Each place’s detourTimeInSeconds and detourDistanceInMeters are typed properties. A negative value means the route through the charger beats the original one.

Related examples