TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ElectricVehicleState

    Electric vehicle state - either percentage or absolute energy.

    Choose the format that matches your data source:

    • Use percentage when you have battery % and max capacity
    • Use kWh when you have absolute energy values
    // Percentage format
    const pctState: ElectricVehicleState = {
    currentChargePCT: 75
    };

    // Energy format
    const kwhState: ElectricVehicleState = {
    currentChargeInkWh: 60
    };