C# SDK

◆ GetRouteInfo() [2/2]

static int GetRouteInfo ( out SError  Error,
out SRouteInfo  RouteInfo,
bool  bExtended,
Int32  MaxTime 
)
inlinestatic

The function returns informations about computed route.

Parameters
ErrorAdditional error information returned from Drive.
RouteInfoReference to instance of SRouteInfo class 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.
MaxTimeMaximum 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 than 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.



References SRouteInfo.SizeOf(), and SError.SizeOf().