Skip to content

Directions API

Date/Time Routing

Date/Time Routing gives the user the ability to specify the time and date of a route, thus compensating for lanes that are HOV at specific times, timed-turned restrictions, and seasonal or specific day of the week closures.

Parameters

NameDescription
timeType
Integer
Specifies the time type to use. Acceptable values are:
  • 0 - None (No date/time options will be used)
  • 1 - Current (Uses the current date/time when generating a route.)
  • 2 - Start At (May specify a specific date/time or day of the week to use when generating a route.)
  • 3 - Arrive By (May specify a specific date/time or day of the week to use when generating a route.)
Default timeType value is 0
dateType
Integer
Specifies the date type to use. If timeType is 0 or 1, this option will be ignored. Acceptable values are:
  • 0 - Specific Date & Time
  • 1 - Sunday
  • 2 - Monday
  • 3 - Tuesday
  • 4 - Wednesday
  • 5 - Thursday
  • 6 - Friday
  • 7 - Saturday
Default dateType value is 0
dateThe format for date is MM/DD/YYYY. If timeType is 0 or 1, or if dateType is 1-7, this option will be ignored.

If dateType is 0 and isoLocal is null, this parameter must be used. MM specifies the month of year. Acceptable values are:
  • 01 - January
  • 02 - February
  • 03 - March
  • 04 - April
  • 05 - May
  • 06 - June
  • 07 - July
  • 08 - August
  • 09 - September
  • 10 - October
  • 11 - November
  • 12 - December
DD specifies the day of the month.

Acceptable values are 01-31. YYYY specifies the year.

Values need to be entered in YYYY format. Default date value is the current date.

Please note that the user has the choice of entering date/time in the ISO 8601 format YYYY-MM-DDThh:mm or as a calendar date (MM/DD/YYYY) and local time (hh:mm) by using the date and localTime fields, respectively.
localTime
Integer
If timeType is 0 or 1, this option will be ignored.

If dateType is 0 and isoLocal is null, this parameter must be used.

If dateType is 1-7, this paramater can be used to set a specific time of day to generate a route.

Values need to be entered in hh:mm format. Default localTime value is the current time.

Please note that the user has the choice of entering date/time in the ISO 8601 format YYYY-MM-DDThh:mm or as a calendar date (MM/DD/YYYY) and local time (hh:mm) by using the date and localTime fields, respectively.
isoLocalIf timeType is 0 or 1, or if dateType is 1-7, this option will be ignored.

If dateType is 0, this is an optional parameter.

The user has the choice of entering date/time in the ISO 8601 format YYYY-MM-DDThh:mm or may enter as individual parameters by using the month, day, year, and localTime fields that are listed below.

Default isoLocal value is the current date and time.
toleranceBeforeIf timeType is 0, 1, or 2, this option will be ignored. Otherwise, if timeType is 3, this is an optional parameter.

Values need to be entered in mm format.

Sets the minutes before the specified arrive time to accept. Default toleranceBefore value is 15 mins.
toleranceAfterIf timeType is 0, 1, or 2, this option will be ignored. Otherwise, if timeType is 3, this is an optional parameter.

Values need to be entered in mm format.

Sets the minutes after the specified arrive time to allow. Default toleranceBefore value is 0.
useTraffic
Boolean
If set to true, will use historical and realtime traffic speeds (depending on route time and availability of data) to influence the route. NOTE: If this option is set to true, the timeType option must be set to something other than "0" (ie not "None").

Default = false
walkingSpeed
Double
This is the speed (in miles per hour as default and it does adhere to the unit specifier) allowed for the pedestrian routeType. This is used for computing expected route times for walking routes.
The default is 2.5 miles per hour.