Package com.tomtom.sdk.common.route

Types

Link copied to clipboard
data class Announcement(    val id: UniqueId = UniqueId(),     val point: GeoCoordinate? = null,     val distance: Distance,     val type: String,     val maneuver: AnnouncementManeuver? = null,     val message: String = "",     val verbalMessage: String = "",     val verbalMessagePhonetics: Phonetics? = null,     val nextManeuver: AnnouncementManeuver? = null)

Fine-grained announcement points, each with its own message, location and distance to the instruction point.

Link copied to clipboard
value class AnnouncementManeuver

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

Link copied to clipboard
enum ConsumptionUnit : Enum<ConsumptionUnit>

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

Link copied to clipboard
class Destination(    val id: RoutePointId,     val place: Place,     val navigableCoordinates: List<GeoCoordinate>,     val routeOffset: Distance,     val roadSide: RoadSide? = null) : RoutePoint

Represents the destination of the route.

Link copied to clipboard
enum DrivingSide : Enum<DrivingSide>

Indicates driving side at the point of the maneuver.

Link copied to clipboard
enum JunctionType : Enum<JunctionType>

The type of the junction at which the maneuver takes place.

Link copied to clipboard
value class Maneuver

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

Link copied to clipboard
class Origin(    val id: RoutePointId,     val place: Place,     val navigableCoordinates: List<GeoCoordinate>,     val routeOffset: Distance) : RoutePoint

Represents the origin of the route.

Link copied to clipboard
data class Phonetics(    val street: String = "",     val streetLanguageCode: String = "",     val roadNumbers: List<String> = emptyList(),     val roadNumbersLanguageCodes: List<String> = emptyList(),     val signPostText: String = "",     val signPostTextLanguageCode: String = "")

Phonetic strings of all of the readable Instruction properties.

Link copied to clipboard
data class PhoneticString(    val value: String,     val language: String,     val alphabet: String)

Represents a phonetic string.

Link copied to clipboard
data class RoadInformation(    val roadName: String = "",     val roadNamePhonetics: PhoneticString? = null,     val roadNumbers: List<String> = emptyList(),     val roadNumbersPhonetics: List<PhoneticString> = emptyList(),     val roadShields: List<RoadShield> = emptyList())

Road information at a given point on a Route.

Link copied to clipboard
data class RoadShield(    val fullRoadNumber: String,     val shieldContent: String = "",     val affixes: List<String> = emptyList(),     val stateCode: String = "",     val countryCode: String = "",     val languageCode: String = "",     val reference: String = "")

Represents a road shield.

Link copied to clipboard
enum RoadSide : Enum<RoadSide>

Indicates the side of the road at which a RoutePoint is located.

Link copied to clipboard
data class Route(    val id: String,     val length: Distance,     val travelTime: Duration,     val trafficDelay: Duration = Duration.ZERO,     val trafficLength: Distance = Distance.ZERO,     val departureTimeWithZone: DateTime,     val arrivalTimeWithZone: DateTime,     val legs: List<RouteLeg>,     val routePoints: List<RoutePoint>,     val sections: Sections,     val batteryConsumptionInkWh: Float = 0.0f,     val fuelConsumptionInLiters: Float = 0.0f,     val routeCoordinates: List<RouteCoordinate> = emptyList())

The route class contains the route to be navigated, including geometry and generated guidance messages.

Link copied to clipboard
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.

Link copied to clipboard
data class RouteLeg(    val points: List<GeoCoordinate>,     val instructions: List<Instruction>,     val mapReferences: MapReferences? = null)

Represents information about a part of a Route, made up of a list of GeoCoordinate points.

Link copied to clipboard
interface RoutePoint

Represents route place received in response from route planning API.

Link copied to clipboard
value class RoutePointId(val value: UUID = UUID.randomUUID())

A unique identifier, used for matching RoutePoint with ItineraryPoint.

Link copied to clipboard
class Segment(val start: RouteCoordinate, val end: RouteCoordinate)

Represents a line between two RouteCoordinate.

Link copied to clipboard
data class Signpost(    val exitNumber: String = "",     val exitNumberPhonetic: PhoneticString? = null,     val exitName: String = "",     val exitNamePhonetic: PhoneticString? = null,     val towardName: String = "",     val towardNamePhonetic: PhoneticString? = null)

The Signpost class contains information about the signpost for the Instruction.

Link copied to clipboard
class Waypoint(    val id: RoutePointId,     val place: Place,     val navigableCoordinates: List<GeoCoordinate>,     val routeOffset: Distance,     val roadSide: RoadSide?) : RoutePoint

Represents a point where the user wants to stop along the route.

Functions

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.

Link copied to clipboard
fun List<RouteCoordinate>.segmentForDistance(distanceAlongRoute: Distance): Segment

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