This is the documentation of version 1.0.0-rc.3. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias Instruction

    The attributes of a maneuver, such as "Turn right", "Keep left", "Take the ferry", "Take the motorway" or "Arrive".

    Index
    changeOfAngleInDegrees?: number

    The total change of angle in degrees from the entry to the exit of the maneuver, in the range [-180,180). For example, -90 means "forks off to the left in a perpendicular angle". At complex junctions, the angle is relative to the entry road. It is present if the maneuver is a turn or roundabout maneuver, meaning it is one of:

    • STRAIGHT
    • SLIGHT_RIGHT
    • TURN_RIGHT
    • SHARP_RIGHT
    • SLIGHT_LEFT
    • TURN_LEFT
    • SHARP_LEFT
    • MAKE_UTURN
    • ROUNDABOUT_STRAIGHT
    • ROUNDABOUT_SLIGHT_RIGHT
    • ROUNDABOUT_RIGHT
    • ROUNDABOUT_SHARP_RIGHT
    • ROUNDABOUT_SLIGHT_LEFT
    • ROUNDABOUT_LEFT
    • ROUNDABOUT_SHARP_LEFT
    • ROUNDABOUT_BACK
    countryCrossingFromCode?: string

    The code (ISO 3166-1 alpha-3) of the country the border crossing occurs from. It is present if the maneuver is a border crossing, meaning it is one of:

    • CROSS_BORDER
    • TAKE_SHIP_FERRY
    • TAKE_CAR_TRAIN
    • LEAVE_SHIP_FERRY
    • LEAVE_CAR_TRAIN
    countryCrossingFromName?: InstructionText

    The name of the country the border crossing occurs from. It is present if the maneuver is or leads to a border crossing, meaning it is one of:

    • CROSS_BORDER
    • TAKE_SHIP_FERRY
    • TAKE_CAR_TRAIN
    • LEAVE_SHIP_FERRY
    • LEAVE_CAR_TRAIN
    countryCrossingToCode?: string

    The code (ISO 3166-1 alpha-3) of the country the border crossing occurs to. It is present if the maneuver is a border crossing, meaning it is one of:

    • CROSS_BORDER
    • TAKE_SHIP_FERRY
    • TAKE_CAR_TRAIN
    • LEAVE_SHIP_FERRY
    • LEAVE_CAR_TRAIN
    countryCrossingToName?: InstructionText

    The name of the country the border crossing occurs to. It is present if the maneuver is or leads to a border crossing, meaning it is one of:

    • CROSS_BORDER
    • TAKE_SHIP_FERRY
    • TAKE_CAR_TRAIN
    • LEAVE_SHIP_FERRY
    • LEAVE_CAR_TRAIN
    drivingSide?: DrivingSide

    Whether traffic drives on the left or right at the point of the maneuver.

    intersectionName?: InstructionText

    The name of the intersection at which the maneuver must be performed, if available.

    isManeuverObligatory?: boolean

    Whether this maneuver is obligatory, for example at a T-junction where one option is drivable and the other is not. It is present if the maneuver is a turn maneuver, meaning it is one of:

    • SLIGHT_RIGHT
    • TURN_RIGHT
    • SHARP_RIGHT
    • SLIGHT_LEFT
    • TURN_LEFT
    • SHARP_LEFT
    • MAKE_UTURN
    landmark?: Landmark

    The landmark of the instruction, if it has one.

    maneuver: Maneuver

    A code identifying the maneuver, such as "Turn right".

    maneuverPoint: Position

    The location of the maneuver.

    maneuverView?: ManeuverView

    The layout of the junction at this maneuver, with the route's own direction and the directions of the roads it does not take.

    message?: string

    The ready-made, human-readable instruction text, e.g. "Turn right onto Damrak".

    The routing service generates and localises it in the request's language, so you need no translation table of your own. It is absent when the routing service sends none.

    nextRoadInfo: RoadInformation

    Information about the road the route heads to, past the maneuver. It comes from the road past the maneuver, or from the signpost at the maneuver if there is one.

    offsetOfAmbiguousExitFromManeuverInMeters?: number

    The offset on the route, in meters, of an ambiguous exit from the maneuver point (maneuverPoint). It is present if this maneuver is an exit and another exit within a reasonable distance before it may cause ambiguity. The client might then need to resolve the ambiguity and compose an instruction such as "Take the 2nd exit". The offset is absolute, so it is a positive integer even though the ambiguous exit is before the maneuver on the route. It applies to maneuvers that are one of:

    • EXIT_ROUNDABOUT
    • EXIT_MOTORWAY_LEFT
    • EXIT_MOTORWAY_RIGHT
    • SWITCH_MOTORWAY_LEFT
    • SWITCH_MOTORWAY_RIGHT
    pathPointIndex: number

    The index of the point on the route path where the maneuver takes place. maneuverPoint is expected to equal the path point at this index.

    previousRoadInfo: RoadInformation

    Information about the road in the link before the maneuver.

    roadShieldAtlasReference?: string

    The base URL of the Road Shields service, for fetching the road shield atlas and metadata resources. The resources currently available are sprite.png and sprite.json. We recommend caching the sprite atlas (sprite.png) and metadata (sprite.json), since they change infrequently and are large compared to a typical road shield description.

    roadShieldReferences?: RoadShieldReference[]

    The road shield references to show for the instruction.

    roundaboutExitNumber?: number

    The ordinal number of the exit to take at a roundabout, as in "take the first/second exit". It is present if the maneuver is a roundabout maneuver, meaning it is one of:

    • ROUNDABOUT_STRAIGHT
    • ROUNDABOUT_SLIGHT_RIGHT
    • ROUNDABOUT_RIGHT
    • ROUNDABOUT_SHARP_RIGHT
    • ROUNDABOUT_SLIGHT_LEFT
    • ROUNDABOUT_LEFT
    • ROUNDABOUT_SHARP_LEFT
    • ROUNDABOUT_BACK
    roundaboutType?: RoundaboutType

    The kind of roundabout this maneuver takes place on. Roundabout maneuvers have it.

    routeOffsetInMeters: number

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

    routePath: RoutePathPoint[]

    The sequence of all the points the maneuver occupies on the map, as a maneuver can occupy more than one. A maneuver that occupies a single point has a single item, with a point value equal to maneuverPoint.

    sideRoads?: SideRoad[]

    The roads right before the maneuver that connect to the route but are not part of it, in ascending order of offset on route. The driver can take them by accident when following the instruction, without considering the route's dynamic restrictions such as time or vehicle profile dependent ones. A dual-carriageway road might be one or several side roads, depending on how the driver might perceive it. Use them for a richer graphical presentation of the maneuver, showing the connected roads just before it. The list is empty if no road crosses the route before the maneuver. It is present if there are side roads within a reasonable distance before the maneuver.

    signpost?: Signpost

    The information on the signpost that shows the direction on the route, if this maneuver has a signpost.

    signpostRoadShieldReferences?: RoadShieldReference[]

    The road shield references to show for the signpost.

    tollgateName?: InstructionText

    The name of the tollgate, if available. It is present if the maneuver is TOLLGATE.

    tollPaymentTypes?: TollPaymentType[]

    The one or more toll payment options available at this tollgate. It is present if the maneuver is TOLLGATE.

    trafficLightOffsetInMeters?: number

    The distance on the route, in meters, between two consecutive traffic lights when the maneuver takes place at the second. It is present only if the landmark is AT_TRAFFIC_LIGHT.