C++ SDK

◆ OptimizeRoute()

static int CApplicationAPI::OptimizeRoute ( LpError  lpError,
DWORD  dwMaxTime = DEFAULT_MAX_TIME 
)
static

The function optimizes current route.

Parameters
lpErrorAdditional error information returned from Drive.
dwMaxTimeMaximum time (in milliseconds) which function can take. If dwMaxTime=0 function execution is not time limited.
Returns
1 if successful, other value otherwise.

Possible error codes returned from Drive are:

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