This is the documentation of version 0.57.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 "parameter [vehicleHeading] not supported". The routing API takes it as vehicleHeadingInDegrees.
    • 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 is unchanged, including the engine-specific state variants -- an electric vehicle still picks between the percentage and kWh forms.