TomTom Maps for JavaScript
    Preparing search index...

    Type Alias SummaryBase

    The summary of a route or route leg, with departure and arrival times, lengths and durations.

    type SummaryBase = {
        arrivalTime: Date;
        departureTime: Date;
        deviationDistanceInMeters?: number;
        deviationPoint?: Position;
        deviationTimeInSeconds?: number;
        historicTrafficTravelTimeInSeconds?: number;
        lengthInMeters: number;
        liveTrafficIncidentsTravelTimeInSeconds?: number;
        noTrafficTravelTimeInSeconds?: number;
        trafficDelayInSeconds?: number;
        trafficLengthInMeters?: number;
        travelTimeInSeconds: number;
    }
    Index
    arrivalTime: Date

    The estimated arrival time at the end of the route or leg.

    It is the departure time plus the travel time, accounting for traffic conditions.

    departureTime: Date

    The departure time from the beginning of the route or leg, based on the one the routing request specified.

    deviationDistanceInMeters?: number

    The distance in meters from the origin point to the first point where this route forks off from the reference route.

    If the route is identical to the reference route, it is the length of the route. Every alternative route summary has it, but the reference route's doesn't.

    deviationPoint?: Position

    The coordinates of the first point where this route forks off from the reference route.

    If the route is identical to the reference route, it is the last point on the route. Every alternative route summary has it, but the reference route's doesn't.

    deviationTimeInSeconds?: number

    The travel time in seconds from the origin point to the first point where this route forks off from the reference route.

    If the route is identical to the reference route, it is the estimated travel time of the route. Every alternative route summary has it, but the reference route's doesn't.

    historicTrafficTravelTimeInSeconds?: number

    The estimated travel time in seconds from time-dependent historic traffic data.

    It is the expected travel time from typical traffic patterns at the requested departure time, such as rush hour or off-peak. It is present only if you request it with the computeTravelTimeFor parameter.

    lengthInMeters: number

    Total length of the route or leg in meters.

    liveTrafficIncidentsTravelTimeInSeconds?: number

    The estimated travel time in seconds from real-time traffic speed data, based on current live traffic conditions and incidents.

    It is present only if you request it with the computeTravelTimeFor parameter.

    noTrafficTravelTimeInSeconds?: number

    The estimated travel time in seconds in free-flow conditions, as if there were no traffic delays (no congestion).

    It is present only if you request it with the computeTravelTimeFor parameter.

    trafficDelayInSeconds?: number

    The delay in seconds of the traffic events along trafficLengthInMeters.

    It is present only when the routing service sends it, and it is not the gap to free-flow conditions. For the gap to free-flow, request the travel times with computeTravelTimeFor: 'all' and use Math.max(0, liveTrafficIncidentsTravelTimeInSeconds - noTrafficTravelTimeInSeconds). The live travel time can fall below the free-flow one, so keep the floor at 0.

    trafficLengthInMeters?: number

    The length in meters of the route that traffic events delay, which is the portion with congestion or incidents.

    It is present only when the routing service sends it.

    travelTimeInSeconds: number

    The estimated travel time of the route or leg in seconds.

    It includes delays due to real-time traffic. For the free-flow travel time without traffic delays, use noTrafficTravelTimeInSeconds.