Traffic

The routing matrix calculation can take into account traffic information. This may impact the distances/travel times in the calculated matrix.

Traffic information is time dependent. It can be either:

  • The current state of traffic (live)
  • Historical traffic data

When planning ahead or calculating routes in the past, the time of traffic must be specified. Only one time point can be specified as the depature time from all origins. This departure time is then applied to all route calculations.

The service automatically decides which traffic information to apply. For departure times in the future, either live or historical traffic data is applied depending on how far is the departure time in future. For departure times in the past, only historical traffic data is applied.

Departure Time

Traffic time is determined by the departureTime field in the matrix request. Possible values are:

  • omitted or null: the service uses traffic information at the current time.
  • ISO 8601 datetime (with explicit time zone): the service uses the available traffic information at the specified time.
  • any: the service does not use traffic information.

Example

The following example shows a routing matrix request with an explicit departure time:

{
    "origins": [
        {"lat": 52.52103, "lng": 13.41268},
        {"lat": 52.51628, "lng": 13.37771},
        {"lat": 52.47342, "lng": 13.40357}
    ],
    "regionDefinition": {
        "type": "boundingBox",
        "north": 52.53,
        "south": 52.46,
        "west": 13.35,
        "east": 13.42
    },
    "departureTime": "2018-12-19T18:23:45+0100"
}

results matching ""

    No results matching ""