This is the documentation of version 1.0.0-rc.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TrafficAreaAnalyticsDateRange

    The continuous date-range variant, which analyses traffic between startDate and endDate.

    • endDate is optional. If omitted, it defaults to three days ago, the latest date the service always has data for.
    • endDate falls one to 31 UTC calendar days after startDate.
    • Mutually exclusive with TrafficAreaAnalyticsDays.
    type TrafficAreaAnalyticsDateRange = {
        days?: never;
        endDate?: AreaAnalyticsDateInput;
        startDate: AreaAnalyticsDateInput;
    }
    Index
    days?: never

    The end date of the analysis period (inclusive), as a Date object or an ISO 'YYYY-MM-DD' string. By default, it is three days ago.

    It must be within 31 days from startDate, and no later than two days before today.

    '2024-08-07'
    
    new Date('2024-08-07')
    

    The start date of the analysis period, as a Date object or an ISO 'YYYY-MM-DD' string.

    '2024-08-01'
    
    new Date('2024-08-01')