When routing to a segment with a temporary closure due to roadworks, etc., the routing may return a very long journey time, which is unrealistic.
In other products such as Map&Guide internet, no route is returned in such a case, as the point cannot be connected to the segments for routing.
The delay is caused by the fact that the closure expires at a certain time and the system waits until the road is virtually reopened.
If you request the TRAFFIC_EVENTS for this route directly, you will receive the following information:
"events": [
{
"latitude": 52.479051174,
"longitude": 13.432830347,
"startsAt": "2023-09-13T16:15:34+02:00",
"distanceFromStart": 0,
"travelTimeFromStart": 0,
"countryCode": "DE",
"utcOffset": 120,
"traffic": {
"delay": 28613,
"description": "Rollbergstraße eastbound at Berlin
closed",
"accessType": "ENTER",
"relatedEventIndex": 1
}
},
{
"latitude": 52.479272211,
"longitude": 13.434499653,
"startsAt": "2023-09-14T00:13:09+02:00",
"distanceFromStart": 116,
"travelTimeFromStart": 28655,
"countryCode": "DE",
"utcOffset": 120,
"traffic": {
"delay": 28613,
"description": "Rollbergstraße eastbound at Berlin
closed",
"accessType": "EXIT",
"relatedEventIndex": 0
}
}
]
If you want to obtain realistic travel times for these exceptional routes, the only option is to subtract the delay time for this event from the travel time. Using the traffic delay from the route response directly for this simplifies this step, but of course carries the risk that further events on the route will no longer be mapped realistically.