An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
Hello Jeff Haacke,
Greetings! Thanks for raising this question in Q&A forum.
The reason you cannot find a "waypoint timestamp" is that Azure Maps does not return them as a separate field. Instead, the route response is broken into legs, and each waypoint you add in your request automatically creates a new leg in the response. The arrival time at a waypoint is simply the arrivalTime found inside that leg's summary, and the departure time from that waypoint is the departureTime of the next leg.
Here is how you can get those timestamps.
Check your request has multiple points In your "query" parameter, make sure you are passing the waypoints in order, for example start:waypoint1:waypoint2:end. Each colon separated point becomes a leg boundary.
Look inside "legs" not "summary" In the response, ignore the top level "summary" block (that one only covers the full route). Instead open the "legs" array. You will see one leg object per waypoint to waypoint segment.
Read the arrival and departure time per leg Each leg has its own: "summary": { "departureTime": "...", "arrivalTime": "..." } The arrivalTime of leg 1 tells you when you arrive at waypoint 1, the arrivalTime of leg 2 tells you when you arrive at waypoint 2, and so on. The arrivalTime of the last leg is your arrival at the final destination.
Make sure timestamps are being calculated If departureTime and arrivalTime are missing even inside legs, add the parameter computeTravelTimeFor=all and optionally traffic=true to your request, and also pass a valid departAt or arriveAt value so the service knows the time base to calculate from.
Double check this in the Batch response Since "Post Route Directions Batch" just wraps multiple individual route responses, the same structure applies. Open batchItems[i].response.routes[0].legs, and read the summary inside each leg the same way as above.
You can see a sample response with this leg structure here: https://learn.microsoft.com/en-us/rest/api/maps/route/post-route-directions-batch-sync
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.