ArcGIS Developers

Route Class

class Esri::ArcGISRuntime::Route

A Route contains information about the best way to maneuver between a series of Stops. More...

Header: #include <Route>
Since: Esri::ArcGISRuntime 100.0

This class was introduced in Esri::ArcGISRuntime 100.0.

Public Functions

Route(Esri::ArcGISRuntime::Route &&other)
Route(const Esri::ArcGISRuntime::Route &other)
Esri::ArcGISRuntime::Route &operator=(Esri::ArcGISRuntime::Route &&other)
Esri::ArcGISRuntime::Route &operator=(const Esri::ArcGISRuntime::Route &other)
double cost(const QString &attributeName) const
Esri::ArcGISRuntime::DirectionManeuverListModel *directionManeuvers(QObject *parent = nullptr) const
QDateTime endTime() const
double endTimeShift() const
bool isEmpty() const
Esri::ArcGISRuntime::Polyline routeGeometry() const
QString routeName() const
QDateTime startTime() const
double startTimeShift() const
QList<Esri::ArcGISRuntime::Stop> stops() const
double totalLength() const
double totalTime() const
double travelTime() const
double violationTime() const
double waitTime() const

Detailed Description

A Route is obtained from a RouteResult once a RouteTask is solved. The Route contains information such as the route geometry, distance, travel time, and direction maneuvers. Obtain a Route from the RouteResult, once a RouteTask is executed and completes successfully.

Member Function Documentation

Route::Route(Esri::ArcGISRuntime::Route &&other)

Move constructor from other Route.

Route::Route(const Esri::ArcGISRuntime::Route &other)

Copy constructor from other Route.


Default constructor.

Warning: This is for convenience only and will construct an empty object.

Esri::ArcGISRuntime::Route &Route::operator=(Esri::ArcGISRuntime::Route &&other)

Move operator from other Route.

Esri::ArcGISRuntime::Route &Route::operator=(const Esri::ArcGISRuntime::Route &other)

Assignment operator from other Route.



double Route::cost(const QString &attributeName) const

Returns the cost of a given attributeName.

Example attribute names include "Minutes" or "TravelTime".

Esri::ArcGISRuntime::DirectionManeuverListModel *Route::directionManeuvers(QObject *parent = nullptr) const

Returns a DirectionManeuverListModel of the direction maneuvers.

Specify an optional parent to ensure that the list model persists if you want it to have lifetime beyond this Route object.

QDateTime Route::endTime() const

Returns the end time of a Route in UTC time.

double Route::endTimeShift() const

Returns the value of time zone shift for end time in minutes.

bool Route::isEmpty() const

Returns true if this Route is empty.

Esri::ArcGISRuntime::Polyline Route::routeGeometry() const

Returns the Route geometry that connects the various Stops.

QString Route::routeName() const

Returns the name of the Route.

QDateTime Route::startTime() const

Returns the start time of a Route in UTC time.

double Route::startTimeShift() const

Returns the value of time zone shift for start time in minutes.

QList<Esri::ArcGISRuntime::Stop> Route::stops() const

Returns a list of Stops used in this Route.

Only applicable if RouteParameters::isReturnStops used in the associated RouteTask is true.

double Route::totalLength() const

Returns the total length (distance).

The returned value's units is in meters.

double Route::totalTime() const

Returns the total time in minutes.

This includes any travel time, time spent waiting at stops (arriving before the start of a time window), and service time at stops.

double Route::travelTime() const

Returns the travel time in minutes.

This only includes time of travel.

double Route::violationTime() const

Returns the violation time in minutes.

This includes the total amount of additional time incurred due to time window violations.

double Route::waitTime() const

Returns the wait time in minutes.

This includes the total amount of additional time incurred due to waiting at time windows.

Feedback on this topic?