Page 1 of 1

How to obtain driver break coordinates when using xTour/planTours

Posted: Mon Mar 09, 2026 9:50 am
by CAPcargo
Hi,

When we call xTour/planTours with a driver breaks configuration, the response may contain planned breaks. However, the response does not include the actual coordinates where the break occurs. Instead, it only provides the driving time from the previous stop.

This creates a limitation in our system because we cannot display the driver break location on our map.

While investigating alternative approaches, we noticed that xRoute/calculateRoute does return coordinates for breaks (under Route events):

Image


Based on this, we considered the following approach:
  • Call xTour/planTours and obtain the planned tour result.
  • Identify waypoint pairs where a break occurs between two stops.
  • For each such pair, call xRoute/calculateRoute.
  • Extract the break coordinate from the xRoute response and use it in our system.
  • To ensure that the break is inserted at exactly the same point as in the original xTour planning, we set:
    • The same break configuration as the xTour request plus
    • TourRestrictions/WorkLogbookSummary/configurableWorkingHoursLogbookSummary/accumulatedDrivingTimeSinceLastBreak
    to the driving time already completed up to the first waypoint in the xRoute call.
    This ensures that the break is inserted at the same moment in the route as it was planned by xTour/planTours.
We tested this approach using the Raw Request Runner, and the results were consistent:
xRoute placed the breaks at exactly the same times as those generated by the original xTour request, while also providing the coordinates we needed.

:?: Our question is the following:
  • Is this the recommended approach according to the API design, or have we possibly missed a simpler or more direct method for obtaining break coordinates when using xTour/planTours?

Marko Arsovski,
CAPcargo

Re: How to obtain driver break coordinates when using xTour/planTours

Posted: Mon Mar 09, 2026 10:11 am
by Bernd Welter
Hello Marko,

your approach sounds valid to me. Please be aware of the following comments:
  • xTour2 is not aware of underlying geometries of routes - it simply uses the traveltimes / distances given by xDima2's matrices. Therefore xtour2 cannot return exact positions.
  • Under some circumstances the traveltimes / distances of a Matrix based call could differ from the KPIs returned by a 1:1 routing. This is in fact quite often happening when you apply CONVENTIONAL routing instead of HIGH_PERFORMANCE_ROUTING. :!: To minimize gaps you are recommended to use the same HPR for the xDima2 and xRoute2 calls.
Best regards,
Bernd