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

    Type Alias CombustionVehicleParams

    Parameters specific to combustion engine vehicles.

    Use for petrol, diesel, or other fuel-powered vehicles when you need accurate fuel consumption and range calculations.

    const params: CombustionVehicleParams = {
    engineType: 'combustion',
    model: {
    dimensions: {
    weightKG: 1500
    },
    engine: {
    consumption: {
    fuelEnergyDensityInMJoulesPerLiter: 34.2,
    speedsToConsumptionsLiters: [
    { speedKMH: 50, consumptionUnitsPer100KM: 6.5 },
    { speedKMH: 90, consumptionUnitsPer100KM: 7.2 },
    { speedKMH: 120, consumptionUnitsPer100KM: 9.0 }
    ]
    }
    }
    },
    state: {
    currentFuelInLiters: 45
    }
    };
    type CombustionVehicleParams = {
        engineType: "combustion";
        model?: ExplicitVehicleModel<"combustion">;
        state?: VehicleState<"combustion">;
    }
    Index
    engineType: "combustion"

    Combustion vehicles.

    Identifies this as a fuel-powered vehicle (petrol, diesel, etc.).

    model?: ExplicitVehicleModel<"combustion">

    Model (static properties) specifically for combustion engine vehicles.

    Can include fuel consumption curves and efficiency parameters. A predefined variantId is not accepted here — only the charging-stops endpoint understands one.

    state?: VehicleState<"combustion">

    State specifically for combustion engine vehicles.

    Must include current fuel level for range calculations.