RoutingEngine class abstract

Use the RoutingEngine to calculate a route from A to B with a number of waypoints in between.

Route calculation is done asynchronously and requires an online connection. The resulting route contains various information such as the polyline, route length in meters, estimated time to traverse along the route and maneuver data.

Note: The engine does not support an unlimited number of waypoints. The limit is defined by the HERE backend services and may change. For now, the maximum number of waypoints should be below 200. This value may change and it is not guaranteed to be stable. If you need to support very large lists of waypoints, consider to import a route (see importRoute() method) or use the OfflineRoutingEngine which supports an unlimited number of waypoints. The OfflineRoutingEngine is only available for Navigate licence.

Implemented types

Constructors

RoutingEngine()
Creates a new instance of this class.
factory
RoutingEngine.withConnectionSettings(RoutingConnectionSettings connectionSettings)
Creates a new instance of RoutingEngine.
factory
RoutingEngine.withSdkEngine(SDKNativeEngine sdkEngine)
Creates a new instance of RoutingEngine.
factory
RoutingEngine.withSdkEngineAndConnectionSettings(SDKNativeEngine sdkEngine, RoutingConnectionSettings connectionSettings)
Creates a new instance of RoutingEngine.
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

calculateRouteWithRoutingOptions(List<Waypoint> waypoints, RoutingOptions options, CalculateRouteCallback callback) → TaskHandle
Asynchronously calculates a route from one point to another, passing through the given waypoints in the given order.
inherited
calculateTrafficOnRoute(Route route, int lastTraveledSectionIndex, int traveledDistanceOnLastSectionInMeters, CalculateTrafficOnRouteCallback callback) → TaskHandle
Asynchronously calculates the traffic along a route starting from the index of the last traveled route section and an offset (in meters) from the last visited position on the section.
calculateTrafficOnRouteWithCurrentCharge(Route route, int lastTraveledSectionIndex, int traveledDistanceOnLastSectionInMeters, double currentChargeInKilowattHours, CalculateTrafficOnRouteCallback callback) → TaskHandle
Asynchronously calculates the traffic along an EV car route starting from the index of the last traveled route section and an offset in meters from the last visited position on the section.
importRouteFromHandleWithRoutingOptions(RouteHandle routeHandle, RoutingOptions options, CalculateRouteCallback callback) → TaskHandle
Asynchronously recreates a route from the RouteHandle provided, i.e.
importRouteWithRoutingOptions(List<Location> locations, RoutingOptions options, CalculateRouteCallback callback) → TaskHandle
Asynchronously creates a route from a sequence of geographic coordinates very close to each other.
importRouteWithStopsAndRoutingOptions(List<Location> locations, List<RouteStop> routeStops, RoutingOptions options, CalculateRouteCallback callback) → TaskHandle
Asynchronously creates a route from a sequence of geographic coordinates very close to each other.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshRouteWithRouteHandleAndRefreshRouteParameters(RefreshRouteParameters refreshRouteParameters, RoutingOptions routingOptions, CalculateRouteCallback callback) → TaskHandle
Asynchronously refreshes a previously calculated route from the provided RouteHandle, updating the starting point and route metadata based on RoutingOptions.
returnToRouteWithTraveledDistance(Route route, Waypoint startingPoint, int lastTraveledSectionIndex, int traveledDistanceOnLastSectionInMeters, CalculateRouteCallback callback) → TaskHandle
Asynchronously calculates a new route that leads back to the original route.
inherited
setCustomOption(String name, String? value) → RoutingError?
Sets a custom option for routing backend queries.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited