Parameters used to perform automatic rerouting, if off-route while navigating a route. More...
Header: | #include <ReroutingParameters.h> |
Since: | Esri::ArcGISRuntime 100.11 |
Inherits: | Esri::ArcGISRuntime::Object |
Public Functions
ReroutingParameters(Esri::ArcGISRuntime::RouteTask *routeTask, const Esri::ArcGISRuntime::RouteParameters &routeParameters, QObject *parent = nullptr) | |
virtual | ~ReroutingParameters() override |
bool | isVisitFirstStopOnStart() const |
Esri::ArcGISRuntime::ArcGISFeatureTable * | networkEdgeGeometries() const |
Esri::ArcGISRuntime::RouteParameters | routeParameters() const |
Esri::ArcGISRuntime::RouteTask * | routeTask() const |
void | setNetworkEdgeGeometries(Esri::ArcGISRuntime::ArcGISFeatureTable *networkEdgeGeometries) |
void | setStrategy(Esri::ArcGISRuntime::ReroutingStrategy strategy) |
void | setVisitFirstStopOnStart(bool visitFirstStopOnStart) |
Esri::ArcGISRuntime::ReroutingStrategy | strategy() const |
Detailed Description
This class defines how automatic rerouting calculations will be performed if off-route is detected while navigating a route. To enable rerouting, call the RouteTracker::enableReroutingAsync(Esri::ArcGISRuntime::ReroutingParameters*) method passing in this class as the argument.
Note that rerouting only occurs when the current location is off-route, but on or near the transportation network edges. For example if an off-route state is detected but the tracked location is in a parking lot, away from any transportation network edges, rerouting will not occur, and will occur only when a subsequent tracked location is on or near the transportation network edges.
Member Function Documentation
ReroutingParameters::ReroutingParameters (Esri::ArcGISRuntime::RouteTask *routeTask , const Esri::ArcGISRuntime::RouteParameters &routeParameters , QObject *parent = nullptr)
Creates a re-routing parameters object based on a RouteTask and RouteParameters.
- routeTask - A RouteTask capable of solving routes on the same network used by the original route, usually the same RouteTask that was used to create the route being tracked. Used for rerouting in background thread.
- routeParameters - The route parameters.
- parent - The optional parent QObject.
The following RouteParameters properties will be ignored:
- RouteParameters::setStopsWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&)
- RouteParameters::isFindBestSequence
- RouteParameters::outputSpatialReference
- RouteParameters::isPreserveFirstStop
- RouteParameters::startTime
- RouteParameters::isReturnDirections
- RouteParameters::isReturnStops
- RouteParameters::isReturnRoutes
errorOccurred is emitted if the RouteTask or RouteParameters are nullptr
.
See also RouteResult.
[override virtual]
ReroutingParameters::~ReroutingParameters ()
Destructor.
bool ReroutingParameters::isVisitFirstStopOnStart () const
Returns a bool
that determines whether the first stop must be visited when rerouted (false
by default).
Esri::ArcGISRuntime::ArcGISFeatureTable *ReroutingParameters::networkEdgeGeometries () const
Returns a FeatureTable containing the Polyline geometries that the RouteTask's network is based on. During the rerouting the geometries are used to determine if the current location is on or near the navigation network. The rerouting calculation will be skipped if the current location is off the network. The geometry type of the feature table must be a Polyline.
Setting this property is only needed when the RouteTask for the navigation is based on a service. When the RouteTask is based on local data on the device, access to the Polyline geometries is already available to the rerouting algorithm.
The FeatureTable can be the original network source data or one created specifically for checking if located on an edge.
If there are multiple sources, the geometries should be merged into a single table.
Only the geometries are needed in the FeatureTable, not the attributes.
Online feature services should support pagination, otherwise RouteTracker::enableReroutingAsync(Esri::ArcGISRuntime::ReroutingParameters*) will emit an error. To improve performance online feature service should have a maxRecordCount >= 2000 (this decreases the count of online queries).
See also setNetworkEdgeGeometries().
Esri::ArcGISRuntime::RouteParameters ReroutingParameters::routeParameters () const
Returns a RouteParameters object that defines parameters for the rerouting RouteTask.
The following RouteParameters properties will be ignored:
- RouteParameters::setStopsWithFeatureTable(Esri::ArcGISRuntime::ArcGISFeatureTable*, const Esri::ArcGISRuntime::QueryParameters&)
- RouteParameters::isFindBestSequence
- RouteParameters::outputSpatialReference
- RouteParameters::isPreserveFirstStop
- RouteParameters::startTime
- RouteParameters::isReturnDirections
- RouteParameters::isReturnStops
- RouteParameters::isReturnRoutes
Esri::ArcGISRuntime::RouteTask *ReroutingParameters::routeTask () const
Returns a RouteTask capable of solving routes on the same network that created the original route.
This is usually the same RouteTask that was used to create the route being tracked. The RouteTask will be used for rerouting in background thread.
void ReroutingParameters::setNetworkEdgeGeometries (Esri::ArcGISRuntime::ArcGISFeatureTable *networkEdgeGeometries )
Sets the networkEdgeGeometries to networkEdgeGeometries.
See also networkEdgeGeometries.
void ReroutingParameters::setStrategy (Esri::ArcGISRuntime::ReroutingStrategy strategy)
Sets the strategy to strategy.
See also strategy.
void ReroutingParameters::setVisitFirstStopOnStart (bool visitFirstStopOnStart )
Sets the visitFirstStopOnStart to visitFirstStopOnStart.
See also isVisitFirstStopOnStart.
Esri::ArcGISRuntime::ReroutingStrategy ReroutingParameters::strategy() const
Returns a rerouting strategy that determines how new routes are created (to the next waypoint by default).
See also setStrategy().