Parameters used to perform automatic rerouting, if off-route while navigating a route. More...
This class was introduced in Esri::ArcGISRuntime 100.11.
|ReroutingParameters(Esri::ArcGISRuntime::RouteTask *routeTask, const Esri::ArcGISRuntime::RouteParameters &routeParameters, QObject *parent = nullptr)|
|Esri::ArcGISRuntime::ArcGISFeatureTable *||networkEdgeGeometries() const|
|Esri::ArcGISRuntime::RouteTask *||routeTask() const|
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::enableRerouting 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 Rerouting parameters.
- routeTask - A RouteTask capable of solving routes on the same network used by the original route.
- routeParameters - Creates a re-routing parameters object based on a RouteTask and RouteParameters.
- parent - The optional parent QObject.
See also RouteResult.
Returns 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 via the Runtime.
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::enableRerouting will emit an error. To improve performance, the online feature service should have a maxRecordCount >=
2000 (this decreases the count of online queries).
See also setNetworkEdgeGeometries().
Esri::ArcGISRuntime::RouteParameters ReroutingParameters::routeParameters() const
The following RouteParameters properties will be ignored: RouteParameters::setStopsWithFeatureTable(ArcGISFeatureTable, QueryParameters), RouteParameters::isFindBestSequence, RouteParameters::outputSpatialReference, RouteParameters::isPreserveFirstStop, RouteParameters::startTime, RouteParameters::isReturnDirections, RouteParameters::isReturnStops, and RouteParameters::isReturnRoutes.
Esri::ArcGISRuntime::RouteTask *ReroutingParameters::routeTask() const
Returns a RouteTask capable of solving routes on the same network that created the original route.
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.
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().