Route

class Route

This class represents a route between two or more RouteWaypoint.

Parameters

privateRoute

Instance of PrivateRoute based on which publicly visible Route instance will be constructed

routeOptions

RouteOptions used to compute this route

Properties

Link copied to clipboard

Bounding box of entire route (the smallest rectangle containing the route).

Link copied to clipboard

Time it takes to drive from start to end point of this route in seconds without the stop time of all Waypoint of the route

Link copied to clipboard

Length of route in meters

Link copied to clipboard

Route's maximum speed in kph : can be defined by the profile of the vehicle used for route calculation (in Profile.drivingProfile) or by the route's optimization when EVRouteOptions.routeOptim is set to RouteOptim.ECO

Link copied to clipboard

Geometric representation of this route.

Link copied to clipboard

RouteOptions used to compute this route.

Link copied to clipboard

Returns the list of sections associated to this route

Link copied to clipboard

Route sheet after a route computation using the default language.

Link copied to clipboard

Time it takes to travel this route in seconds, taking into account the stop time of all Waypoint of the route

Link copied to clipboard

List of all RouteWaypoint of the route, which includes at least the starting point and the destination.

Functions

Link copied to clipboard
fun getAlertRadius(waypointIdx: Int): Int

Returns the alert radius of the specified route waypoint

Link copied to clipboard

Returns the energy consumption along this route (expressed in kWh)

Link copied to clipboard

Returns the estimated SoC (in %) at arrival

Link copied to clipboard

Gets the location (in coordinates) from a position defined in percentage on the route. This method is designed for circuit navigation to get the geographic location of a specific progress point along the circuit.

Link copied to clipboard

Returns the number of Route Waypoints (including departure and destination points).

Link copied to clipboard
fun getPartialPolyline2D(startOffset: Long = 0, endOffset: Long = 0, arrayAtts: Array<Attribute>?): Polyline2D?

Builds a partial geometric representation of this route with additional attribute(s)

Link copied to clipboard

Gets the position on the route in percentage from a matched location (in coordinates). This method is designed for circuit navigation to get the progress along the circuit.

Link copied to clipboard

Returns the simplified geometry of the Route and transforms it in a list of RouteWaypoint. Doesn't modify the Route.

Link copied to clipboard
fun isArrivalReachable(minSocAtArrival: Double = 0.0): Boolean

Indicates if the route's arrival is reachable with a SoC at arrival superior or equal to the specified minSocAtArrival (without recharging)

Link copied to clipboard
fun setAlertRadius(radius: Int): Boolean

Updates the alert radius of all route waypoints

fun setAlertRadius(waypointIdx: Int, radius: Int): Boolean

Updates the alert radius of the specified route waypoint

Link copied to clipboard
fun toFullJson(minSocAtArrival: Double): String
Link copied to clipboard
fun toJson(): String

Build String in Json format of the Route.