TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TrafficInput

    TrafficInput: "live" | "historical"

    Traffic consideration mode for route calculation.

    Controls how traffic conditions are factored into routing and travel time estimates.

    Traffic Modes:

    • live: Real-time + historical traffic

      • Includes current traffic jams and incidents
      • Considers short-term and long-term road closures
      • Most accurate for immediate departures
      • Updates with current conditions
    • historical: Typical traffic patterns only

      • Based on historical data for time of day/week
      • Ignores current traffic conditions
      • Good for future trip planning
      • More predictable for scheduled departures
    // Route considering current traffic (departing now)
    const trafficMode: TrafficInput = 'live';

    // Route based on typical patterns (planning ahead)
    const plannedRoute: TrafficInput = 'historical';