Router

class Router : NativeMethodsReceiver

Types

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

Routing error types.

Task
Link copied to clipboard
class Task

Class responsible for cancelling the running operation it represents.

Functions

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

Cancels all computes.

computeEVRange
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

computeNextDurations
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.

computeRouteFromJSONString
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

computeRouteWithAlternatives
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.

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

Retrieves charging waypoints from computed route

getListeners
Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> getListeners(clazz: Class<T>): MutableMap<T, Executor>
getRemainingBatteryCapacityAt
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

register
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
size
Link copied to clipboard
open fun size(): Int
unregister
Link copied to clipboard
open fun <T : NativeMethodsReceiver.NativeListener> unregister(clazz: Class<T>, listener: T): Int