DynamicRoutingEngine class abstract
This class queries the HERE routing backend to find routes with less traffic and therefore an earlier remaining estimated time of arrival.
DynamicRoutingEngine polls the HERE routing backend periodically to find the best new route out of a given initial route. For initial route calculation it is recommended to use the RoutingEngine as it already requests traffic-optimized routes.
When a better route is found, it is recommended to follow these steps to set the new route:
- Stop the DynamicRoutingEngine.
- Update the currently active
Navigatorinstance with the newly found route. - Restart the DynamicRoutingEngine. This should be done outside of the
onBetterRouteFound()callback.
For both DynamicRoutingEngine and RoutingEngine, the resulting routes are optimized based on speed flow changes such as traffic jams, street closures or road accidents. To get the best result, it is recommended to not specify the RouteOptions.departureTime as then the current time is used by default.
The poll interval is defined by DynamicRoutingEngineOptions.pollInterval and triggered by DynamicRoutingEngine.updateCurrentLocation.
Constructors
- DynamicRoutingEngine(DynamicRoutingEngineOptions? options)
-
Creates a new instance of this class.
factory
- DynamicRoutingEngine.withSdkEngine(SDKNativeEngine sdkEngine, DynamicRoutingEngineOptions? options)
-
Creates a new instance of this class.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
Route route, DynamicRoutingListener listener) → void - Starts polling the HERE backend services to find a better route, as defined by the DynamicRoutingEngineOptions.
-
startWithWaypoints(
RouteHandle routeHandle, List< Waypoint> waypoints, RefreshRouteOptions refreshRouteOptions, DynamicRoutingListener listener) → void - Starts polling the HERE backend services to find a better route, as defined by the DynamicRoutingEngineOptions.
-
startWithWaypointsAndRoutingOptions(
RouteHandle routeHandle, List< Waypoint> waypoints, RoutingOptions routingOptions, DynamicRoutingListener listener) → void - Starts polling the HERE backend services to find a better route, as defined by the DynamicRoutingEngineOptions.
-
stop(
) → void - Stops polling the HERE backend services.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCurrentLocation(
MapMatchedLocation mapMatchedLocation, int sectionIndex) → void - Updates the current location.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited