importEVTruckRouteWithStops abstract method

  1. @Deprecated("Will be removed in v4.28.0. Use the `import_route()` methods with RoutingOptions parameter instead.")
TaskHandle importEVTruckRouteWithStops(
  1. List<Location> locations,
  2. List<RouteStop> routeStops,
  3. EVTruckOptions evTruckOptions,
  4. CalculateRouteCallback callback,
)

Asynchronously creates an electric truck route from a sequence of geographic coordinates very close to each other.

The route shape will be kept as close as possible to the one provided. For best results please use 1Hz GPS data, or geographic coordinates that have a spacing of a few meters one from the other. For example, such a list of geographic coordinates can be extracted from a GPX trace or a route object from a 3rd party library. Very sparse data may be rejected by the service with an error.

Note: Any restrictions applied to a transport type or provided options will be discarded and reported as violations in Section.sectionNotices .

  • locations The list of locations used to calculate the route. Note that only the Location.coordinates of a location are used to import the route.

An RoutingError.invalidParameter error is generated when the location list size is not in the range [2,50000].

  • routeStops The list of RouteStop's which contains index of location from locations list used for route stop and duration in seconds spent on stop.

An RoutingError.invalidParameter error is generated when the route stops list size is not in the range [1,locations.size()-2], any of location_index is < 1 or location_indexes are not unique.

  • evTruckOptions Options specific for an electric truck route calculation, along with common route options.

  • callback Callback object that will be invoked after route calculation. It is always invoked on the main thread.

Returns TaskHandle. Handle that will be used to manipulate the execution of the task.

Implementation

@Deprecated("Will be removed in v4.28.0. Use the `import_route()` methods with RoutingOptions parameter instead.")

TaskHandle importEVTruckRouteWithStops(List<Location> locations, List<RouteStop> routeStops, EVTruckOptions evTruckOptions, CalculateRouteCallback callback);