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)
This method will compute routes in all directions from the position, and returns a polygon of where you can go with your battery capacity.You can get multiple polygons for different capacities in one call.
open fun calculateEVRange(position: GeoCoordinates, capacities: List<Double>, options: RoutingOptions, profile: EVProfile, listener: Router.EVRangeListener, @Nullable() executor: Executor)
This method will compute routes in all direction f rom position, and returs polygon area where you can go with your battery capacity.You can get multiple polygons for different capacities in one call.
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)
Deprecated - use computeRoute with RouteRequest
open fun computeAETRRoute(routePlan: RoutePlan, @NonNull() profile: AETRProfile, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
Deprecated - use computeRoute with RouteRequest
computeEVRoute
Link copied to clipboard
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, listener: Router.RouteComputeListener)
Deprecated - use computeRoute with RouteRequest
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, @NonNull() preference: EVPreferences, listener: Router.RouteComputeListener)
Deprecated - use computeRoute with RouteRequest
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
Deprecated - use computeRoute with RouteRequest
open fun computeEVRoute(routePlan: RoutePlan, @NonNull() profile: EVProfile, @NonNull() preference: EVPreferences, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
Deprecated - use computeRoute with RouteRequest
computeGuidedRoute
Link copied to clipboard
open fun computeGuidedRoute(@NonNull() profile: GuidedRouteProfile, @NonNull() listener: Router.RouteComputeListener)
Deprecated - use computeRoute with RouteRequest
open fun computeGuidedRoute(@NonNull() profile: GuidedRouteProfile, @NonNull() listener: Router.RouteComputeListener, @Nullable() executor: Executor)
Deprecated - use computeRoute with RouteRequest
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(@NonNull() routeRequest: RouteRequest, @NonNull() listener: Router.RouteComputeListener)
open fun computeRoute(@NonNull() routeRequest: RouteRequest, listener: Router.RouteComputeListener, @Nullable() executor: Executor)
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 Deprecated - use createRouteRequestFromJSONString
createRouteRequestFromJSONString
Link copied to clipboard
open fun createRouteRequestFromJSONString(@NonNull() json: String, @NonNull() listener: OnRouteRequestDeserialized)
Creates RouteRequest from JSON that was serialized via serializeToBriefJSON
open fun createRouteRequestFromJSONString(@NonNull() json: String, @NonNull() listener: OnRouteRequestDeserialized, @Nullable() executor: Executor)
Creates RouteRequest 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