Parameters for a RouteTask, such as stops, barriers, and whether to return directions. More...
Header: | #include <RouteParameters.h> |
Since: | Esri::ArcGISRuntime 100.0 |
This class was introduced in Esri::ArcGISRuntime 100.0.
Public Functions
RouteParameters(Esri::ArcGISRuntime::RouteParameters &&other) | |
RouteParameters(const Esri::ArcGISRuntime::RouteParameters &other) | |
RouteParameters() | |
Esri::ArcGISRuntime::RouteParameters & | operator=(Esri::ArcGISRuntime::RouteParameters &&other) |
Esri::ArcGISRuntime::RouteParameters & | operator=(const Esri::ArcGISRuntime::RouteParameters &other) |
~RouteParameters() | |
QStringList | accumulateAttributeNames() const |
void | clearPointBarriers() |
void | clearPolygonBarriers() |
void | clearPolylineBarriers() |
void | clearStops() |
Esri::ArcGISRuntime::UnitSystem | directionsDistanceUnits() const |
QString | directionsLanguage() const |
Esri::ArcGISRuntime::DirectionsStyle | directionsStyle() const |
bool | isEmpty() const |
bool | isFindBestSequence() const |
bool | isPreserveFirstStop() const |
bool | isPreserveLastStop() const |
bool | isReturnDirections() const |
bool | isReturnPointBarriers() const |
bool | isReturnPolygonBarriers() const |
bool | isReturnPolylineBarriers() const |
bool | isReturnRoutes() const |
bool | isReturnStops() const |
Esri::ArcGISRuntime::SpatialReference | outputSpatialReference() const |
Esri::ArcGISRuntime::RouteShapeType | routeShapeType() const |
QString | searchWhereClause(const QString &sourceName) const |
void | setAccumulateAttributeNames(const QStringList &accumulateAttributeNames) |
void | setDirectionsDistanceUnits(Esri::ArcGISRuntime::UnitSystem directionsDistanceUnits) |
void | setDirectionsLanguage(const QString &directionsLanguage) |
void | setDirectionsStyle(Esri::ArcGISRuntime::DirectionsStyle directionsStyle) |
void | setFindBestSequence(bool findBestSequence) |
void | setOutputSpatialReference(const Esri::ArcGISRuntime::SpatialReference &outputSpatialReference) |
void | setPointBarriers(const QList<Esri::ArcGISRuntime::PointBarrier> &pointBarriers) |
void | setPointBarriersWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters) |
void | setPolygonBarriers(const QList<Esri::ArcGISRuntime::PolygonBarrier> &polygonBarriers) |
void | setPolygonBarriersWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters) |
void | setPolylineBarriers(const QList<Esri::ArcGISRuntime::PolylineBarrier> &polylineBarriers) |
void | setPolylineBarriersWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters) |
void | setPreserveFirstStop(bool preserveFirstStop) |
void | setPreserveLastStop(bool preserveLastStop) |
void | setReturnDirections(bool returnDirections) |
void | setReturnPointBarriers(bool returnPointBarriers) |
void | setReturnPolygonBarriers(bool returnPolygonBarriers) |
void | setReturnPolylineBarriers(bool returnPolylineBarriers) |
void | setReturnRoutes(bool returnRoutes) |
void | setReturnStops(bool returnStops) |
void | setRouteShapeType(Esri::ArcGISRuntime::RouteShapeType routeShapeType) |
void | setSearchWhereClause(const QString &sourceName, const QString &searchWhereClause) |
void | setStartTime(const QDateTime &startTime) |
void | setStops(const QList<Esri::ArcGISRuntime::Stop> &stops) |
void | setStopsWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable, const Esri::ArcGISRuntime::QueryParameters &queryParameters) |
void | setTravelMode(const Esri::ArcGISRuntime::TravelMode &travelMode) |
QDateTime | startTime() const |
Esri::ArcGISRuntime::TravelMode | travelMode() const |
Detailed Description
Stops and barriers can be in any spatial reference, and do not need to be reprojected to match the network dataset's spatial reference. However, all of the stops and barriers must be in the same spatial reference. For example, the network dataset could be in WKID 4326, and your map, stops, and barriers could all be in WKID 3857. The RouteTask will automatically reproject the stops and barriers, and output the Route in whatever output spatial reference is specified.
Note: RouteParameters is only default-constructible for convenience. It should be retrieved from the RouteTask class so it will be assigned necessary defaults required to solve routes.
See also RouteTask::createDefaultParameters.
Member Function Documentation
RouteParameters::RouteParameters (Esri::ArcGISRuntime::RouteParameters &&other)
Move constructor from other RouteParameters.
RouteParameters::RouteParameters (const Esri::ArcGISRuntime::RouteParameters &other)
Copy constructor from other RouteParameters.
RouteParameters::RouteParameters ()
Default constructor.
Esri::ArcGISRuntime::RouteParameters &RouteParameters::operator=(Esri::ArcGISRuntime::RouteParameters &&other)
Move operator from other RouteParameters.
Esri::ArcGISRuntime::RouteParameters &RouteParameters::operator=(const Esri::ArcGISRuntime::RouteParameters &other)
Assignment operator from other RouteParameters.
RouteParameters::~RouteParameters ()
Destructor.
QStringList RouteParameters::accumulateAttributeNames () const
Returns a list of network attribute names to be accumulated with the analysis.
See also setAccumulateAttributeNames().
void RouteParameters::clearPointBarriers ()
Clears the point barriers that have been set on this RouteParameters.
void RouteParameters::clearPolygonBarriers ()
Clears the polygon barriers that have been set on this RouteParameters.
void RouteParameters::clearPolylineBarriers ()
Clears the polyline barriers that have been set on this RouteParameters.
void RouteParameters::clearStops ()
Clears the stops that have been set on this RouteParameters.
Esri::ArcGISRuntime::UnitSystem RouteParameters::directionsDistanceUnits () const
Returns the units in which the length information will be reported in the route directions.
See also setDirectionsDistanceUnits().
QString RouteParameters::directionsLanguage () const
Returns the language of the resulting route directions.
See also setDirectionsLanguage().
Esri::ArcGISRuntime::DirectionsStyle RouteParameters::directionsStyle () const
Returns the style of the resulting route directions.
See also setDirectionsStyle().
bool RouteParameters::isEmpty () const
Returns true
if this RouteParameters is empty.
bool RouteParameters::isFindBestSequence () const
Returns whether the analysis should reorder stops to find the optimized route.
The default value is false
.
bool RouteParameters::isPreserveFirstStop () const
Returns whether the analysis should preserve the first stop.
This parameter is applicable only if isFindBestSequence is true.
bool RouteParameters::isPreserveLastStop () const
Returns whether the analysis should preserve the last stop.
This parameter is applicable only if isFindBestSequence is true.
bool RouteParameters::isReturnDirections () const
Returns whether directions are returned with the RouteResult.
bool RouteParameters::isReturnPointBarriers () const
Returns whether point barriers are returned with the RouteResult.
bool RouteParameters::isReturnPolygonBarriers () const
Returns whether polygon barriers are returned with the RouteResult.
bool RouteParameters::isReturnPolylineBarriers () const
Returns whether polyline barriers are returned with the RouteResult.
bool RouteParameters::isReturnRoutes () const
Returns whether routes are returned with the RouteResult.
bool RouteParameters::isReturnStops () const
Returns whether stops are returned with the RouteResult.
Esri::ArcGISRuntime::SpatialReference RouteParameters::outputSpatialReference () const
Returns the output spatial reference.
See also setOutputSpatialReference().
Esri::ArcGISRuntime::RouteShapeType RouteParameters::routeShapeType () const
Returns the output shape type for a route.
See also setRouteShapeType().
QString RouteParameters::searchWhereClause (const QString &sourceName ) const
Returns the search WHERE clause from the specified sourceName.
See also setSearchWhereClause().
void RouteParameters::setAccumulateAttributeNames (const QStringList &accumulateAttributeNames )
Sets a list of accumulateAttributeNames to be returned.
See also accumulateAttributeNames().
void RouteParameters::setDirectionsDistanceUnits (Esri::ArcGISRuntime::UnitSystem directionsDistanceUnits )
Sets the directionsDistanceUnits in which the length information will be reported in the route directions.
See also directionsDistanceUnits().
void RouteParameters::setDirectionsLanguage (const QString &directionsLanguage )
Sets the directionsLanguage of the resulting route directions.
See also directionsLanguage().
void RouteParameters::setDirectionsStyle (Esri::ArcGISRuntime::DirectionsStyle directionsStyle )
Sets the directionsStyle of the resulting route directions.
See also directionsStyle().
void RouteParameters::setFindBestSequence (bool findBestSequence )
Sets whether findBestSequence is true
.
This indicates whether the analysis should reorder stops to find the optimized route. The default is false
.
If the parameter value is false
, the analysis returns a route that visits stops in the order you define. The order you define is the order that the stops are encountered in the array of stops in the RouteParameters. For example, the Stop at index zero is first, index 1 is second, and so on. If the parameter value is true
, the analysis disregards the order you defined, and finds the best order to visit the stops. You can elect to preserve the first and/or the last stops while allowing the service to reorder intermediary stops by setting setPreserveFirstStop and setPreserveLastStop.
Note: A value of true
causes the analysis to switch from solving a shortest-path problem to a traveling salesperson problem (TSP). Solving a TSP is computer-intensive operation and if using an online subscription-based service (e.g. ArcGIS Online) may incur additional service credits per route.
See also isFindBestSequence().
void RouteParameters::setOutputSpatialReference (const Esri::ArcGISRuntime::SpatialReference &outputSpatialReference )
Sets the outputSpatialReference.
See also outputSpatialReference().
void RouteParameters::setPointBarriers (const QList<Esri::ArcGISRuntime::PointBarrier > &pointBarriers )
Sets the pointBarriers for a RouteTask by providing a list of PointBarrier.
void RouteParameters::setPointBarriersWithFeatureTable (Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable , const Esri::ArcGISRuntime::QueryParameters &queryParameters )
Sets the point barriers for a RouteTask by providing a featureTable filtered with queryParameters.
void RouteParameters::setPolygonBarriers (const QList<Esri::ArcGISRuntime::PolygonBarrier > &polygonBarriers )
Sets the polygonBarriers for a RouteTask by providing a list of PolygonBarrier.
void RouteParameters::setPolygonBarriersWithFeatureTable (Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable , const Esri::ArcGISRuntime::QueryParameters &queryParameters )
Sets the polygon barriers for a RouteTask by providing a featureTable filtered with queryParameters.
void RouteParameters::setPolylineBarriers (const QList<Esri::ArcGISRuntime::PolylineBarrier > &polylineBarriers )
Sets the polylineBarriers for a RouteTask by providing a list of PolylineBarrier.
void RouteParameters::setPolylineBarriersWithFeatureTable (Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable , const Esri::ArcGISRuntime::QueryParameters &queryParameters )
Sets the polyline barriers for a RouteTask by providing a featureTable filtered with queryParameters.
void RouteParameters::setPreserveFirstStop (bool preserveFirstStop )
Sets whether the analysis should preserveFirstStop.
This parameter is applicable only if isFindBestSequence is true.
See also isPreserveFirstStop().
void RouteParameters::setPreserveLastStop (bool preserveLastStop )
Sets whether the analysis should preserveLastStop.
This parameter is applicable only if isFindBestSequence is true.
See also isPreserveLastStop().
void RouteParameters::setReturnDirections (bool returnDirections )
Sets whether to returnDirections with the RouteResult.
See also isReturnDirections().
void RouteParameters::setReturnPointBarriers (bool returnPointBarriers )
Sets whether to returnPointBarriers with the RouteResult.
Reusing the list of PointBarriers from the RouteResult (as opposed to using the original list of PointBarriers) can increase the speed of any subsequent route calculations.
See also isReturnPointBarriers().
void RouteParameters::setReturnPolygonBarriers (bool returnPolygonBarriers )
Sets whether to returnPolygonBarriers with the RouteResult.
Reusing the PolygonBarriers from the RouteResult (as opposed to using the original PolygonBarriers) can increase the speed of any following Route calculations. This is particularly true for complex polygons.
See also isReturnPolygonBarriers().
void RouteParameters::setReturnPolylineBarriers (bool returnPolylineBarriers )
Sets whether to returnPolylineBarriers with the RouteResult.
Reusing the list of PolylineBarriers from the RouteResult (as opposed to using the original PolylineBarriers) can increase the speed of any following Route calculations. This is particularly true for complex polylines.
See also isReturnPolylineBarriers().
void RouteParameters::setReturnRoutes (bool returnRoutes )
Sets whether to returnRoutes with the RouteResult.
See also isReturnRoutes().
void RouteParameters::setReturnStops (bool returnStops )
Sets whether to returnStops with the RouteResult.
See also isReturnStops().
void RouteParameters::setRouteShapeType (Esri::ArcGISRuntime::RouteShapeType routeShapeType )
Sets the output routeShapeType for a route.
See also routeShapeType().
void RouteParameters::setSearchWhereClause (const QString &sourceName , const QString &searchWhereClause )
Sets the searchWhereClause for the specified sourceName.
This filters the potential matches returned from the task based on an expression.
Note: Search WHERE clauses are not supported for online route tasks. They are only supported when solving local route tasks.
See also searchWhereClause().
void RouteParameters::setStartTime (const QDateTime &startTime )
Sets the startTime of the route in UTC time.
See also startTime().
void RouteParameters::setStops (const QList<Esri::ArcGISRuntime::Stop > &stops)
Sets the stops for a RouteTask by providing a list of Stop.
A minimum of 2 stops are required to complete a RouteTask.
void RouteParameters::setStopsWithFeatureTable (Esri::ArcGISRuntime::ArcGISFeatureTable *featureTable , const Esri::ArcGISRuntime::QueryParameters &queryParameters )
Sets the stops for a RouteTask by providing a featureTable filtered with queryParameters.
void RouteParameters::setTravelMode (const Esri::ArcGISRuntime::TravelMode &travelMode )
Sets the travelMode.
See also travelMode().
QDateTime RouteParameters::startTime () const
Returns the start time of the route in UTC time.
See also setStartTime().
Esri::ArcGISRuntime::TravelMode RouteParameters::travelMode () const
Returns the travel mode.
See also setTravelMode().