TomTom Maps for JavaScript
    Preparing search index...

    Type Alias VehiclePreferences<E>

    VehiclePreferences: E extends "electric" ? ElectricVehiclePreferences : {}

    Vehicle preferences - optional routing preferences based on engine type.

    Type Parameters

    • E extends VehicleEngineType = undefined

      The engine type (combustion, electric, or undefined for generic)

    Currently only electric vehicles have specific preferences (charging stops). Future versions may add preferences for combustion vehicles.

    // Electric vehicle with charging preferences
    const evPrefs: VehiclePreferences<'electric'> = {
    chargingPreferences: {
    minChargeAtDestinationPCT: 20,
    minChargeAtChargingStopsPCT: 10
    }
    };

    // Combustion or generic vehicle (no preferences)
    const genericPrefs: VehiclePreferences = {};