sdk-routing / com.tomtom.online.sdk.routing.data / Instruction

Instruction

open class Instruction : Serializable

A set of attributes describing a maneuver, e.g., 'Turn right', 'Keep left', 'Take the ferry', 'Take the motorway', 'Arrive'.

Constructors

<init>

Instruction()

Empty constructor for the Instruction.

Instruction(routeOffsetInMeters: Int, travelTimeInSeconds: Int, point: LatLng!, instructionType: String!, street: String!, roadNumbers: Array<String!>!, exitNumber: String!, countryCode: String!, signpostText: String!, junctionType: String!, turnAngleInDecimalDegrees: Int, roundaboutExitNumber: Int, possibleCombineWithNext: Boolean, drivingSide: String!, maneuver: String!, message: String!, combinedMessage: String!)

Default constructor for the Instruction.

Properties

combinedMessage

var combinedMessage: String!

A human-readable message for the maneuver combined with the message from the next instruction.

countryCode

var countryCode: String!

The 3-character ISO 3166-1 alpha-3 country code.

drivingSide

var drivingSide: String!

Indicates left-hand vs. right-hand side driving at the point of the maneuver.

exitNumber

var exitNumber: String!

The number(s) of a highway exit taken by the current maneuver. If an exit has multiple exit numbers, they will be separated by "," and possibly aggregated by "-", e.g., "10, 13-15".

instructionType

var instructionType: String!

The type of the instruction, e.g., a turn or change of road form.

junctionType

var junctionType: String!

The type of the junction at which the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout.

maneuver

var maneuver: String!

A code identifying the maneuver (e.g., 'Turn right').

message

var message: String!

A human-readable message for the maneuver.

point

var point: LatLng!

A location of the maneuver defined as a latitude longitude pair.

possibleCombineWithNext

var possibleCombineWithNext: Boolean

It is possible to optionally combine the instruction with the next one. This can be used to build messages like "Turn left and then turn right".

roadNumbers

var roadNumbers: Array<String!>!

An aggregate for roadNumber elements.

roundaboutExitNumber

var roundaboutExitNumber: Int

Indicates which exit to take at a roundabout.

routeOffsetInMeters

var routeOffsetInMeters: Int

The distance from the start of the route to the point of the instruction.

signpostText

var signpostText: String!

The text on a signpost which is most relevant to the maneuver, or to the direction that should be followed.

street

var street: String!

The street name of the next significant road segment after the maneuver, or of the street that should be followed.

travelTimeInSeconds

var travelTimeInSeconds: Int

The estimated travel time up to the point corresponding to routeOffsetInMeters.

turnAngleInDecimalDegrees

var turnAngleInDecimalDegrees: Int

Indicates the direction of an instruction.

Functions

getCombinedMessage

open fun getCombinedMessage(): String!

A human-readable message for the maneuver combined with the message from the next instruction.

getCountryCode

open fun getCountryCode(): String!

Returns the 3-character ISO 3166-1 alpha-3 country code.

getDrivingSide

open fun getDrivingSide(): String!

Indicates left-hand vs. right-hand side driving at the point of the maneuver.

getExitNumber

open fun getExitNumber(): String!

Returns the number(s) of a highway exit taken by the current maneuver. If an exit has multiple exit numbers, they will be separated by "," and possibly aggregated by "-", e.g., "10, 13-15".

getInstructionType

open fun getInstructionType(): String!

Returns the type of the instruction, e.g., a turn or change of road form.

getJunctionType

open fun getJunctionType(): String!

Returns the type of the junction at which the maneuver takes place. For larger roundabouts, two separate instructions are generated for entering and leaving the roundabout.

getManeuver

open fun getManeuver(): String!

A code identifying the maneuver (e.g., 'Turn right').

getMessage

open fun getMessage(): String!

A human-readable message for the maneuver.

getPoint

open fun getPoint(): LatLng!

Returns the location of the maneuver defined as a latitude longitude pair.

getRoadNumbers

open fun getRoadNumbers(): Array<String!>!

Returns an aggregate for roadNumber elements.

getRoundaboutExitNumber

open fun getRoundaboutExitNumber(): Int

Returns the information for which exit to take at a roundabout.

getRouteOffsetInMeters

open fun getRouteOffsetInMeters(): Int

Returns the distance from the start of the route to the point of the instruction.

getSignpostText

open fun getSignpostText(): String!

Returns the text on a signpost which is most relevant to the maneuver, or to the direction that should be followed.

getStreet

open fun getStreet(): String!

Returns the street name of the next significant road segment after the maneuver, or of the street that should be followed.

getTravelTimeInSeconds

open fun getTravelTimeInSeconds(): Int

Returns the estimated travel time up to the point corresponding to routeOffsetInMeters.

getTurnAngleInDecimalDegrees

open fun getTurnAngleInDecimalDegrees(): Int

Returns the direction of an instruction.

isPossibleCombineWithNext

open fun isPossibleCombineWithNext(): Boolean

Defines if it is possible to optionally combine the instruction with the next one. This can be used to build messages like "Turn left and then turn right".

toString

open fun toString(): String