Router

open class Router : NativeMethodsReceiver

Contains classes, protocols, and enumerations for describing and calculating routes.

Types

EVRangeListener
Link copied to clipboard
interface EVRangeListener
RecomputeType
Link copied to clipboard
annotation class RecomputeType
RouteComputeAdapter
Link copied to clipboard
abstract class RouteComputeAdapter : Router.RouteComputeListener
Listener adapter for RouteComputeListener
RouteComputeError
Link copied to clipboard
annotation class RouteComputeError
Routing error types.
RouteComputeListener
Link copied to clipboard
interface RouteComputeListener : NativeMethodsReceiver.NativeListener
Represents a listener to handle route calculation updates.
RouteDurationListener
Link copied to clipboard
interface RouteDurationListener : NativeMethodsReceiver.NativeListener

Functions

calculateEVRange
Link copied to clipboard
open fun calculateEVRange(position: GeoCoordinates, capacities: List<Double>, options: RoutingOptions, profile: EVProfile, listener: Router.EVRangeListener)
open fun calculateEVRange(position: GeoCoordinates, capacities: List<Double>, options: RoutingOptions, profile: EVProfile, listener: Router.EVRangeListener, @Nullable() executor: Executor)
cancelCompute
Link copied to clipboard
open fun cancelCompute()
Cancels a computed route or cancel current computing.
computeAETRRoute
Link copied to clipboard
open fun computeAETRRoute(routePlan: RoutePlan, @NonNull() profile: AETRProfile, listener: Router.RouteComputeListener)
open fun computeAETRRoute(routePlan: RoutePlan, @NonNull() profile: AETRProfile, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
computeEVRoute
Link copied to clipboard
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, listener: Router.RouteComputeListener)
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, @NonNull() preference: EVPreferences, listener: Router.RouteComputeListener)
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, @NonNull() preference: EVPreferences, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
computeGuidedRoute
Link copied to clipboard
open fun computeGuidedRoute(@NonNull() profile: GuidedRouteProfile, @NonNull() listener: Router.RouteComputeListener)
open fun computeGuidedRoute(@NonNull() profile: GuidedRouteProfile, @NonNull() listener: Router.RouteComputeListener, @Nullable() executor: Executor)
computeNextDurations
Link copied to clipboard
open fun computeNextDurations(route: Route, times: List<Long>, listener: Router.RouteDurationListener)
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.
open fun computeNextDurations(route: Route, times: List<Long>, listener: Router.RouteDurationListener, @Nullable() executor: Executor)
Compute the duration 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.
computeRoute
Link copied to clipboard
open fun computeRoute(routePlan: RoutePlan, listener: Router.RouteComputeListener)
This method will compute a full route.
open fun computeRoute(routePlan: RoutePlan, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
This method will compute a full route.
computeRouteFromJSONString
Link copied to clipboard
open fun computeRouteFromJSONString(json: String, listener: Router.RouteComputeListener)
Calculates route from JSON string that was serialized via serializeToBriefJSON
open fun computeRouteFromJSONString(json: String, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
Calculates route from JSON string that was serialized via serializeToBriefJSON
createBriefJSONFromITF
Link copied to clipboard
open fun createBriefJSONFromITF(filePath: String): String
Creates a brief JSON from ITF file
createRoutePlanFromJSONString
Link copied to clipboard
open fun createRoutePlanFromJSONString(json: String): List<Waypoint>
Creates a list of Waypoints from JSON that was serialized via serializeToBriefJSON
destroy
Link copied to clipboard
open fun destroy()
getChargingWaypoints
Link copied to clipboard
open fun getChargingWaypoints(route: Route): List<ChargingWaypoint>
getRemainingBatteryCapacityAt
Link copied to clipboard
open fun getRemainingBatteryCapacityAt(waypoint: Waypoint, profile: EVProfile, route: Route): Float
Calculates remaining battery capacity (kwh) at given waypoint at route based on starting ev profile