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

    Type Alias VehicleParameters

    VehicleParameters: { model?: VehicleModel; state?: VehicleState } & VehicleRestrictions

    Vehicle details for routing.

    Type Declaration

    • Optionalmodel?: VehicleModel

      The vehicle model (static properties).

      It includes dimensions and other characteristics that don't change during travel.

    • Optionalstate?: VehicleState

      The vehicle state.

      It includes current heading and other properties that vary during travel.

    They combine all vehicle-related parameters:

    • Model: static properties (weight)
    • State: current conditions (heading)
    • Restrictions: maximum speed and toll transponder applied during route planning

    Specify them when:

    • Weight restrictions matter (trucks, vans)
    • The vehicle is speed-limited, or carries a toll transponder
    // Van with just its weight
    const van: VehicleParameters = {
    model: {
    dimensions: {
    weightKG: 3500
    }
    }
    };

    // Speed-limited truck
    const truck: VehicleParameters = {
    model: {
    dimensions: {
    weightKG: 40000
    }
    },
    restrictions: {
    maxSpeedKMH: 80
    }
    };