TomTom Maps for JavaScript
    Preparing search index...

    Function calculateReachableRange

    • Calculate the area reachable from a starting point within given constraints.

      The Reachable Range service (also known as isochrone) computes a polygon representing all locations that can be reached from an origin within specified limits of time, distance, or energy consumption. This is essential for range analysis, service area visualization, and logistics planning.

      Parameters

      • params: ReachableRangeParams

        Reachable range parameters including origin and budget constraints

      • OptionalcustomTemplate: Partial<ReachableRangeTemplate>

        Advanced customization for request/response handling

      Returns Promise<PolygonFeature<ReachableRangeParams>>

      Promise resolving to a polygon representing the reachable area

      Key features:

      • Time-based ranges: Areas reachable within a time budget (e.g., 30 minutes)
      • Distance-based ranges: Areas within a distance limit (e.g., 50km)
      • Energy-based ranges: EV range considering battery consumption
      • Traffic awareness: Accounts for current and historic traffic patterns
      • Vehicle-specific: Considers vehicle characteristics and constraints

      Common use cases:

      • Service area mapping: "Show areas we can deliver to within 1 hour"
      • EV range visualization: Display drivable range on current battery
      • Real estate: "Find homes within 45 minutes of workplace"
      • Emergency services: Calculate ambulance/fire truck response areas
      • Market analysis: Identify customer catchment areas
      • Location planning: Optimize facility placement based on coverage
      // Calculate 30-minute drive time range
      const range30min = await calculateReachableRange({
      key: 'your-api-key',
      origin: [4.9041, 52.3676], // Amsterdam
      timeBudgetInSec: 1800 // 30 minutes
      });

      // Calculate 50km distance range
      const range50km = await calculateReachableRange({
      key: 'your-api-key',
      origin: [4.9041, 52.3676],
      distanceBudgetInMeters: 50000
      });

      // EV range based on battery
      const evRange = await calculateReachableRange({
      key: 'your-api-key',
      origin: [4.9041, 52.3676],
      fuelBudgetInkWh: 20, // Remaining battery
      vehicleEngineType: 'electric',
      constantSpeedConsumptionInkWhPerHundredkm: [[50, 8], [80, 12]]
      });

      // Traffic-aware range at departure time
      const morningRange = await calculateReachableRange({
      key: 'your-api-key',
      origin: [4.9041, 52.3676],
      timeBudgetInSec: 2700, // 45 minutes
      departAt: new Date('2025-10-20T08:00:00Z') // Rush hour
      });