TomTom Maps for JavaScript
    Preparing search index...

    Type Alias ReachableRangeOwnParams

    Parameters specific to reachable range calculation.

    These parameters are combined with common routing parameters to calculate the reachable area from a starting point.

    type ReachableRangeOwnParams = {
        budget: ReachableRangeBudget;
        maxFerryLengthMeters?: number;
        origin: HasLngLat;
        smoothing?: "none" | "weak" | "strong";
        when?: DepartArriveParams<"departAt">;
    }
    Index

    Properties

    The budget for the reachable range calculation.

    Consists of a type indicating whether it's about time, distance, or fuel/charge and the units, plus its value.

    Determines the extent of the reachable area polygon.

    maxFerryLengthMeters?: number

    Maximum ferry length in meters to consider.

    Ferries longer than this value will be avoided in the calculation. Useful for excluding long ferry routes that might extend the range unrealistically.

    maxFerryLengthMeters: 5000  // Avoid ferries longer than 5 km
    
    origin: HasLngLat

    Location from which the range calculation should start.

    The center point from which reachability is calculated. Can be:

    • An object with lon and lat properties
    • An array [longitude, latitude]
    // Object format
    origin: { lon: 4.9, lat: 52.3 }

    // Array format
    origin: [4.9, 52.3]
    smoothing?: "none" | "weak" | "strong"

    Applies post-processing to smooth the polygon boundary for better visual appearance.

    Stronger smoothing generally results in more points.

    smoothing: 'strong'
    
    when?: DepartArriveParams<"departAt">

    Specifies when to depart.

    If past dates are supplied or dates that are impossible to achieve, it will default to departing now.

    Traffic Impact:

    • Future departure times use predictive traffic
    • Current time uses live traffic
    • Historic times use historical patterns
    Depart now
    
    when: { departAt: new Date('2025-10-20T08:00:00Z') }
    when: { departAt: 'now' }