TomTom Maps for JavaScript
    Preparing search index...

    Type Alias GenericVehicleState

    Generic vehicle state properties applicable to all vehicle types.

    Contains state information that doesn't depend on the engine type.

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

    Properties

    Properties

    heading?: number

    The current heading at the starting point, in degrees starting at true North and continuing in a clockwise direction.

    Bearing Reference:

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

    Used to improve initial route calculation by considering the vehicle's current direction of travel.

    Allowed values: 0-359

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