RouteInstructionOutput interface

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

Properties

combinedMessage

A human-readable message for the maneuver combined with the message from the next instruction. Sometimes it is possible to combine two successive instructions into a single instruction making it easier to follow. When this is the case the possibleCombineWithNext flag will be true. For example:

10. Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
11. Follow Einsteinweg/A10/E22 towards Ring Amsterdam

The possibleCombineWithNext flag on instruction 10 is true. This indicates to the clients of coded guidance that it can be combined with instruction 11. The instructions will be combined automatically for clients requesting human-readable guidance. The combinedMessage field contains the combined message:

Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
then follow Einsteinweg/A10/E22 towards Ring Amsterdam.
countryCode

3-character ISO 3166-1 alpha-3 country code. E.g. USA.

drivingSide

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

exitNumber

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

Type of the instruction, e.g., turn or change of road form.

junctionType

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

maneuver

A code identifying the maneuver.

message

A human-readable message for the maneuver.

point

A location represented as a latitude and longitude.

pointIndex

The index of the point in the list of polyline "points" corresponding to the point of the instruction.

possibleCombineWithNext

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

The road number(s) of the next significant road segment(s) after the maneuver, or of the road(s) to be followed. Example: ["E34", "N205"]

roundaboutExitNumber

This indicates which exit to take at a roundabout.

routeOffsetInMeters

Distance from the start of the route to the point of the instruction.

signpostText

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

stateCode

A subdivision (e.g., state) of the country, represented by the second part of an ISO 3166-2 code. This is only available for some countries like the US, Canada, and Mexico.

street

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

travelTimeInSeconds

Estimated travel time up to the point corresponding to routeOffsetInMeters.

turnAngleInDecimalDegrees

Indicates the direction of an instruction. If junctionType indicates a turn instruction:

  • 180 = U-turn
  • [-179, -1] = Left turn
  • 0 = Straight on (a '0 degree' turn)
  • [1, 179] = Right turn

If junctionType indicates a bifurcation instruction:

  • <0 - keep left
  • >0 - keep right

Property Details

combinedMessage

A human-readable message for the maneuver combined with the message from the next instruction. Sometimes it is possible to combine two successive instructions into a single instruction making it easier to follow. When this is the case the possibleCombineWithNext flag will be true. For example:

10. Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
11. Follow Einsteinweg/A10/E22 towards Ring Amsterdam

The possibleCombineWithNext flag on instruction 10 is true. This indicates to the clients of coded guidance that it can be combined with instruction 11. The instructions will be combined automatically for clients requesting human-readable guidance. The combinedMessage field contains the combined message:

Turn left onto Einsteinweg/A10/E22 towards Ring Amsterdam
then follow Einsteinweg/A10/E22 towards Ring Amsterdam.
combinedMessage?: string

Property Value

string

countryCode

3-character ISO 3166-1 alpha-3 country code. E.g. USA.

countryCode?: string

Property Value

string

drivingSide

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

drivingSide?: "LEFT" | "RIGHT"

Property Value

"LEFT" | "RIGHT"

exitNumber

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".

exitNumber?: string

Property Value

string

instructionType

Type of the instruction, e.g., turn or change of road form.

instructionType?: "TURN" | "ROAD_CHANGE" | "LOCATION_DEPARTURE" | "LOCATION_ARRIVAL" | "DIRECTION_INFO" | "LOCATION_WAYPOINT"

Property Value

"TURN" | "ROAD_CHANGE" | "LOCATION_DEPARTURE" | "LOCATION_ARRIVAL" | "DIRECTION_INFO" | "LOCATION_WAYPOINT"

junctionType

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

junctionType?: "REGULAR" | "ROUNDABOUT" | "BIFURCATION"

Property Value

"REGULAR" | "ROUNDABOUT" | "BIFURCATION"

maneuver

A code identifying the maneuver.

maneuver?: "ARRIVE" | "ARRIVE_LEFT" | "ARRIVE_RIGHT" | "DEPART" | "STRAIGHT" | "KEEP_RIGHT" | "BEAR_RIGHT" | "TURN_RIGHT" | "SHARP_RIGHT" | "KEEP_LEFT" | "BEAR_LEFT" | "TURN_LEFT" | "SHARP_LEFT" | "MAKE_UTURN" | "ENTER_MOTORWAY" | "ENTER_FREEWAY" | "ENTER_HIGHWAY" | "TAKE_EXIT" | "MOTORWAY_EXIT_LEFT" | "MOTORWAY_EXIT_RIGHT" | "TAKE_FERRY" | "ROUNDABOUT_CROSS" | "ROUNDABOUT_RIGHT" | "ROUNDABOUT_LEFT" | "ROUNDABOUT_BACK" | "TRY_MAKE_UTURN" | "FOLLOW" | "SWITCH_PARALLEL_ROAD" | "SWITCH_MAIN_ROAD" | "ENTRANCE_RAMP" | "WAYPOINT_LEFT" | "WAYPOINT_RIGHT" | "WAYPOINT_REACHED"

Property Value

"ARRIVE" | "ARRIVE_LEFT" | "ARRIVE_RIGHT" | "DEPART" | "STRAIGHT" | "KEEP_RIGHT" | "BEAR_RIGHT" | "TURN_RIGHT" | "SHARP_RIGHT" | "KEEP_LEFT" | "BEAR_LEFT" | "TURN_LEFT" | "SHARP_LEFT" | "MAKE_UTURN" | "ENTER_MOTORWAY" | "ENTER_FREEWAY" | "ENTER_HIGHWAY" | "TAKE_EXIT" | "MOTORWAY_EXIT_LEFT" | "MOTORWAY_EXIT_RIGHT" | "TAKE_FERRY" | "ROUNDABOUT_CROSS" | "ROUNDABOUT_RIGHT" | "ROUNDABOUT_LEFT" | "ROUNDABOUT_BACK" | "TRY_MAKE_UTURN" | "FOLLOW" | "SWITCH_PARALLEL_ROAD" | "SWITCH_MAIN_ROAD" | "ENTRANCE_RAMP" | "WAYPOINT_LEFT" | "WAYPOINT_RIGHT" | "WAYPOINT_REACHED"

message

A human-readable message for the maneuver.

message?: string

Property Value

string

point

A location represented as a latitude and longitude.

point?: LatLongPairOutput

Property Value

pointIndex

The index of the point in the list of polyline "points" corresponding to the point of the instruction.

pointIndex?: number

Property Value

number

possibleCombineWithNext

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".

possibleCombineWithNext?: boolean

Property Value

boolean

roadNumbers

The road number(s) of the next significant road segment(s) after the maneuver, or of the road(s) to be followed. Example: ["E34", "N205"]

roadNumbers?: string[]

Property Value

string[]

roundaboutExitNumber

This indicates which exit to take at a roundabout.

roundaboutExitNumber?: string

Property Value

string

routeOffsetInMeters

Distance from the start of the route to the point of the instruction.

routeOffsetInMeters?: number

Property Value

number

signpostText

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

signpostText?: string

Property Value

string

stateCode

A subdivision (e.g., state) of the country, represented by the second part of an ISO 3166-2 code. This is only available for some countries like the US, Canada, and Mexico.

stateCode?: string

Property Value

string

street

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

street?: string

Property Value

string

travelTimeInSeconds

Estimated travel time up to the point corresponding to routeOffsetInMeters.

travelTimeInSeconds?: number

Property Value

number

turnAngleInDecimalDegrees

Indicates the direction of an instruction. If junctionType indicates a turn instruction:

  • 180 = U-turn
  • [-179, -1] = Left turn
  • 0 = Straight on (a '0 degree' turn)
  • [1, 179] = Right turn

If junctionType indicates a bifurcation instruction:

  • <0 - keep left
  • >0 - keep right
turnAngleInDecimalDegrees?: number

Property Value

number