What it Returns: A polygon representing the area reachable from the origin within the specified budget (time, distance, or fuel/charge).
Use Cases:
Traffic Consideration:
Results vary based on departure time and traffic conditions. Use
appropriate when values for accurate predictions.
// 30-minute driving range in live traffic
const params: ReachableRangeParams = {
origin: [4.9, 52.3],
budget: { type: 'timeMinutes', value: 30 },
costModel: { routeType: 'fast', traffic: 'live' }
};
// EV range down to 50% remaining battery
const evParams: ReachableRangeParams = {
origin: [4.9, 52.3],
budget: { type: 'remainingChargePCT', value: 50 },
vehicle: {
engineType: 'electric',
model: {
engine: {
consumption: {
speedsToConsumptionsKWH: [{ speedKMH: 80, consumptionUnitsPer100KM: 12 }]
},
charging: { maxChargeKWH: 100 }
}
},
state: { currentChargePCT: 80 }
}
};
// Avoid toll roads
const noTollParams: ReachableRangeParams = {
origin: [4.9, 52.3],
budget: { type: 'timeMinutes', value: 45 },
costModel: { avoid: ['tollRoads'] }
};
Complete parameters for calculating a reachable range.
Combines common service parameters, routing parameters, and reachable range specific options to compute an isochrone or isodistance polygon.