Router

Types

Link copied to clipboard
object Companion
Link copied to clipboard
enum RouteComputeStatus : Enum<Router.RouteComputeStatus>

Routing error types.

Link copied to clipboard
class Task

Class responsible for cancelling the running operation it represents.

Functions

Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> callMethod(clazz: Class<T>, callback: NativeMethodsReceiver.NativeCallback<T>)
Link copied to clipboard
fun cancelComputes()

Cancels all computes.

Link copied to clipboard
fun computeEVRange(    position: GeoCoordinates,     capacities: List<Double>,     options: RoutingOptions,     profile: EVProfile,     listener: EVRangeListener,     executor: Executor? = null): Router.Task

Computes range of EV from given position using different battery capacities battery based on starting ev profile

Link copied to clipboard
fun computeNextDurations(    route: Route,     times: List<Long>,     listener: RouteDurationListener,     executor: Executor? = null): Router.Task

Compute the durations of a route in any given time(s). Note that the speed profiles change each 15 minutes so it's ineffective to request smaller intervals.

Link copied to clipboard
fun computeRouteFromJSONString(    json: String,     listener: RouteComputeListener,     executor: Executor? = null): Router.Task

Computes route from JSON string that was serialized via Route.serializeToBriefJSON

Link copied to clipboard
fun computeRouteWithAlternatives(    primaryRouteRequest: PrimaryRouteRequest,     alternatives: List<AlternativeRouteRequest>? = null,     listener: RouteComputeFinishedListener,     executor: Executor? = null): Router.Task

This method will compute primary route with alternatives, if possible.

Link copied to clipboard
fun getChargingWaypoints(route: Route): List<ChargingWaypoint>

Retrieves charging waypoints from computed route

Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> getListeners(clazz: Class<T>): MutableMap<T, Executor>
Link copied to clipboard
fun getRemainingBatteryCapacityAt(    waypoint: Waypoint,     profile: EVProfile,     route: Route): Float

Calculates remaining battery capacity (kwh) at given waypoint at route based on starting ev profile

Link copied to clipboard
open override fun onContextDestroy()
Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> register(clazz: Class<T>, listener: T): Int
open fun <T : NativeMethodsReceiver.NativeListener> register(    clazz: Class<T>,     listener: T,     @Nullable executor: Executor?): Int
Link copied to clipboard
open fun size(): Int
Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> unregister(clazz: Class<T>, listener: T): Int