RouteCoordinate

data class RouteCoordinate(    val coordinate: GeoCoordinate,     val routeOffset: Distance,     val travelTime: Duration)

Represents route GeoCoordinates together with its distance offset along the route and estimated travel time.

Parameters

coordinate

GeoCoordinate from the route polyline.

routeOffset

Distance offset along the route.

travelTime

Travel time (including traffic delay) from the start of the route.

Important: This is a Public Preview API. It may be changed or removed at any time.

Constructors

Link copied to clipboard
fun RouteCoordinate(    coordinate: GeoCoordinate,     routeOffset: Distance,     travelTime: Duration)

Properties

Link copied to clipboard
val coordinate: GeoCoordinate
Link copied to clipboard
val routeOffset: Distance
Link copied to clipboard
val travelTime: Duration

Extensions

Link copied to clipboard
fun RouteCoordinate.angleTo(that: GeoCoordinate): Double

Calculates the angle (bearing) between this GeoCoordinate and the GeoCoordinate given as an argument.

Link copied to clipboard
fun RouteCoordinate.distanceTo(that: GeoCoordinate): Distance

Calculates the geographic distance from this RouteCoordinate.coordinate to the GeoCoordinate given as an argument.