Skip To Content ArcGIS for Developers Sign In Dashboard

Route 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

Public Functions

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

Detailed Description

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

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()

Default constructor.

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

Route::Route(const Route &other)

Copy constructor from other Route.

Route::Route(Route &&other)

Move constructor from other Route.

Route::~Route()

Destructor.

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

Returns the cost of a given attributeName.

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

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.

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<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.

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

Assignment operator from other Route.

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

Move operator from other Route.


Feedback on this topic?