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

    Type Alias ReachableRangeVehicleParameters

    ReachableRangeVehicleParameters: (
        | Omit<GenericVehicleParams, "state" | "preferences">
        | Omit<CombustionVehicleParams, "state" | "preferences"> & {
            state?: CombustionVehicleState;
        }
        | Omit<ElectricVehicleParams, "state" | "preferences"> & {
            state?: ElectricVehicleState;
        }
    ) & VehicleRestrictions

    Vehicle parameters accepted by calculateReachableRange.

    VehicleParameters without the two things this endpoint has no parameter for:

    • state.heading, which it rejects with "Unknown JSON field '.vehicleHeadingInDegrees'". The routing API takes it under that name.
    • preferences, whose only member is chargingPreferences. Those belong to the charging-stops endpoint, and a range has no stops to plan. A predefined model.variantId therefore needs nothing beside it here, unlike on calculateRoute.

    Both stay available on calculateRoute. Everything else carries over, including the engine-specific state variants — an electric vehicle picks between the percentage and kWh forms.