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
const params: ReachableRangeParams = {
key: 'your-api-key',
origin: [4.9, 52.3],
budget: {
type: 'timeMinutes',
value: 30
},
routeType: 'fastest',
traffic: 'live',
when: { departAt: 'now' }
};
// 50 km distance range
const distanceParams: ReachableRangeParams = {
key: 'your-api-key',
origin: [4.9, 52.3],
budget: {
type: 'distanceKM',
value: 50
}
};
// EV range with 50% battery
const evParams: ReachableRangeParams = {
key: 'your-api-key',
origin: [4.9, 52.3],
budget: {
type: 'remainingChargeCPT',
value: 50
},
vehicle: {
engineType: 'electric',
model: {
engine: {
consumption: {
charging: { maxChargeKWH: 100 }
}
}
},
state: {
currentChargePCT: 80
}
}
};
// Avoid toll roads
const noTollParams: ReachableRangeParams = {
key: 'your-api-key',
origin: [4.9, 52.3],
budget: {
type: 'timeMinutes',
value: 45
},
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.