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
-
calculateBicycleRoute(
List< Waypoint> waypoints, BicycleOptions bicycleOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a bicycle route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculateBusRoute(
List< Waypoint> waypoints, BusOptions busOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a bus route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculateCarRoute(
List< Waypoint> waypoints, CarOptions carOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a car route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculateEVCarRoute(
List< Waypoint> waypoints, EVCarOptions evCarOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates an electric car route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculateEVTruckRoute(
List< Waypoint> waypoints, EVTruckOptions evTruckOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates an electic truck route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculatePedestrianRoute(
List< Waypoint> waypoints, PedestrianOptions pedestrianOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a pedestrian route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculatePrivateBusRoute(
List< Waypoint> waypoints, PrivateBusOptions privateBusOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a private bus route from one point to another,
passing through the given waypoints in the given order.
inherited
-
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
-
calculateScooterRoute(
List< Waypoint> waypoints, ScooterOptions scooterOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a scooter route from one point to another,
passing through the given waypoints in the given order.
inherited
-
calculateTaxiRoute(
List< Waypoint> waypoints, TaxiOptions taxiOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a taxi 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.
-
calculateTruckRoute(
List< Waypoint> waypoints, TruckOptions truckOptions, CalculateRouteCallback callback) → TaskHandle -
Asynchronously calculates a truck route from one point to another,
passing through the given waypoints in the given order.
inherited
-
importBicycleRoute(
List< Location> locations, BicycleOptions bicycleOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a bicycle route from a sequence of geographic coordinates very close to each other.
-
importBicycleRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, BicycleOptions bicycleOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a bicycle route from a sequence of geographic coordinates very close to each other.
-
importBusRoute(
List< Location> locations, BusOptions busOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a bus route from a sequence of geographic coordinates very close to each other.
-
importBusRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, BusOptions busOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a bus route from a sequence of geographic coordinates very close to each other.
-
importCarRoute(
List< Location> locations, CarOptions carOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a car route from a sequence of geographic coordinates very close to each other.
-
importCarRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, CarOptions carOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a car route from a sequence of geographic coordinates very close to each other.
-
importEVCarRoute(
List< Location> locations, EVCarOptions evCarOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates an electric car route from a sequence of geographic coordinates very close to each other.
-
importEVCarRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, EVCarOptions evCarOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates an electric car route from a sequence of geographic coordinates very close to each other.
-
importEVTruckRoute(
List< Location> locations, EVTruckOptions evTruckOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates an electric truck route from a sequence of geographic coordinates very close to each other.
-
importEVTruckRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, EVTruckOptions evTruckOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates an electric truck route from a sequence of geographic coordinates very close to each other.
-
importPedestrianRoute(
List< Location> locations, PedestrianOptions pedestrianOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a pedestrian route from a sequence of geographic coordinates very close to each other.
-
importPedestrianRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, PedestrianOptions pedestrianOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a pedestrian route from a sequence of geographic coordinates very close to each other.
-
importPrivateBusRoute(
List< Location> locations, PrivateBusOptions privateBusOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a private bus route from a sequence of geographic coordinates very close to each other.
-
importPrivateBusRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, PrivateBusOptions privateBusOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a private bus route from a sequence of geographic coordinates very close to each other.
-
importRouteFromHandle(
RouteHandle routeHandle, RefreshRouteOptions refreshRouteOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously recreates a route from the RouteHandle provided, i.e.
-
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.
-
importScooterRoute(
List< Location> locations, ScooterOptions scooterOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a scooter route from a sequence of geographic coordinates very close to each other.
-
importScooterRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, ScooterOptions scooterOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a scooter route from a sequence of geographic coordinates very close to each other.
-
importTaxiRoute(
List< Location> locations, TaxiOptions taxiOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a taxi route from a sequence of geographic coordinates very close to each other.
-
importTaxiRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, TaxiOptions taxiOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a taxi route from a sequence of geographic coordinates very close to each other.
-
importTruckRoute(
List< Location> locations, TruckOptions truckOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a truck route from a sequence of geographic coordinates very close to each other.
-
importTruckRouteWithStops(
List< Location> locations, List<RouteStop> routeStops, TruckOptions truckOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously creates a truck 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
-
refreshRoute(
RouteHandle routeHandle, Waypoint startingPoint, RefreshRouteOptions refreshRouteOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously refreshes a previously calculated route from the provided RouteHandle, updating the starting point and route metadata based on RefreshRouteOptions.
-
refreshRouteWithRouteHandleAndRoutingOptions(
RouteHandle routeHandle, Waypoint startingPoint, RoutingOptions options, CalculateRouteCallback callback) → TaskHandle - Asynchronously refreshes a previously calculated route from the provided RouteHandle, updating the starting point and route metadata based on RoutingOptions.
-
refreshRouteWithTraveledDistance(
RouteHandle routeHandle, Waypoint? startingPoint, int? lastTraveledSectionIndex, int? traveledDistanceOnLastSectionInMeters, RefreshRouteOptions refreshRouteOptions, CalculateRouteCallback callback) → TaskHandle - Asynchronously refreshes a previously calculated route from the provided RouteHandle, updating the starting point and route metadata based on RefreshRouteOptions.
-
refreshRouteWithTraveledDistanceAndRoutingOptions(
RouteHandle routeHandle, Waypoint? startingPoint, int? lastTraveledSectionIndex, int? traveledDistanceOnLastSectionInMeters, RoutingOptions options, 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