This is the documentation of version 1.0.0-rc.2. Go to the latest version, 1.0.0-rc.5.
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 extra time in seconds that current traffic conditions cause, compared to free-flow conditions.

    A value of 0 means no traffic delays.

    trafficLengthInMeters: number

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

    travelTimeInSeconds: number

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

    It includes delays due to real-time traffic, even when considerTraffic=false. For the free-flow travel time without traffic delays, use noTrafficTravelTimeInSeconds.