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

    Type Alias VehicleState

    The vehicle's current conditions, which change during travel.

    const state: VehicleState = {
    heading: 45 // Heading northeast
    };
    type VehicleState = {
        heading?: number;
    }
    Index
    heading?: number

    The current heading at the starting point, in degrees clockwise from true North.

    • North is 0 degrees
    • East is 90 degrees
    • South is 180 degrees
    • West is 270 degrees

    It improves the initial route calculation by considering the vehicle's current direction of travel.

    Allowed values are 0-359.

    heading: 0    // Facing north
    heading: 90 // Facing east
    heading: 180 // Facing south
    heading: 270 // Facing west
    heading: 45 // Facing northeast