Directions API

Transit & 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

Name Description
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
date The 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.
isoLocal If 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.
toleranceBefore If 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.
toleranceAfter If 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 "units" specifier) allowed for walking routes (or walking portions of a multimodal route). This is used for computing expected route times for walking routes. It is also used when computing multimodal routes. Since multimodal routes use date/time and schedule based departures and arrivals from transit stops, the speed which one walks can alter the suggested route.
The default is 2.5 miles per hour.
maxWalkingDistance
Double
This option applies to multimodal routes only. It is the maximum distance (in miles per hour as default and it does adhere to the "units" specifier) to use for any walking segment of a multimodal route. This is the maximum distance allowed when walking from the origin to the initial transit stop or from the final transit stop to the destination multimodal routes. It is also the maximum distance allowed to walk between transit stops for any transfers.
The default is 2.5 miles per hour.
transferPenalty
Integer
This option applies to multimodal routes only. This is a penalty in seconds to apply to transfers. Larger penalties help avoid transfers within transit routes. Decreasing the value makes it more likely that a transfer can be taken (if one is available).
The default is 300 seconds (5 minutes).
avoidTriplds
Integer Collection
This option applies to multimodal routes only. These are transit IDs (trip IDs) that can be added to a request to avoid a particular transit maneuver.