Unable to route

Can you tell me why the following request cannot find a route please:

https://api.tomtom.com/routing/1/calculateRoute/53.1308782,-4.2402432:53.42092,-4.3723/json?key=&routeType=shortest

If I put the same lat/lng pairs into Google it finds a route fine?

Regards,
Andy

Hi, I did some investigation and this is an issue with the service itself. If you add traffic=false to you query it will work.

I will communicate this to the team responsible for this service. Perhaps you can ask the question directly in REST APIs as well, it might help speed up the investigation.

1 Like

Unfortunately we require traffic info when routing as it’s for real time response. When will this be fixed? At the moment we are having numerous issues since our switch from Google APIs and are seriously thinking of reverting back due to the sheer number of customer complaints. We have over 500 customers using this constantly day in day out and it’s becoming cumbersome.

Regards,
Andy.

After investigating a bit more and understanding how traffic impacts the route calculation I discovered that the starting point you provided is next to a closed road, that’s why the routing algorithm doesn’t find a route. Routing with traffic takes into consideration closed roads, and in that particular scenario there’s no alternative road.

This is a very specific use case indeed. Probably it’s not the best solution, but to avoid having no route at all you could make a 2nd call without traffic when the first call fails, which shouldn’t happen often.

Edit: I created an example with your route and traffic incidents to show the closed road. See the GIF bellow:

2 Likes