C++ SDK

◆ GetRouteInfo()

static int CApplicationAPI::GetRouteInfo ( LpError  lpError,
SRouteInfo lpRouteInfo,
BOOL  bExtended = FALSE,
DWORD  dwMaxTime = DEFAULT_MAX_TIME 
)
static

The function returns informations about computed route.

Parameters
lpErrorAdditional error information returned from Drive.
lpRouteInfoReference to instance of SRouteInfo type which contains informations about route after function execution.
bExtendedFlag determining whether the RouteInfo should have TimeToWP and DistToWP set. If the bExtended=true, TimeToWP contains estimated time arrival from actual position to each waypoint of the route and DistToWP contains estimated distance to each waypoint. The size of both arrays is stored in nWPArraySize. If bExtended=false, TimeToWP and DistToWP will remain empty.
dwMaxTimeMaximum time (in milliseconds) function can take. If MaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

GetRouteInfo fills in RouteInfo members.
Status member of RouteInfo determines status of the route. Possible values are:

  • 0x0001 - Computing
  • 0x0002 - Computed
  • 0x0010 - EnumeratingJunctions
  • 0x0020 - ReconstructRoute

Only if Status=0x0002 (Computed) you can be sure that other members of SRouteInfo are valid. See SRouteInfo for information about other RouteInfo members.

Destination of route is possible obtain from GetItineraryList method.

Possible error codes returned from Drive are:

  • 0 - Function not succeeded.
  • 1 - Function succeeded.
  • 2 - Drive not succeeded.
  • 3 - Function reached timeout.