Routing API distance

I faced a problem during using routing API to get distance and time of specific street(route). Sometimes the distance or length is not accurate of a route between the source(x,y) and destination (x,y) and sometimes it is wrong totally. Could I know how the routing API works or the mechanism to know why it sometimes goes wrong?

Hi Rana.

It would be very helpful if you could provide us more details regarding your case. What exact calls you are doing, what source you are using to determine that distance it’s not accurate?

Regards,
Mateusz

I tried to use routing API (apiURL = “https://api.tomtom.com/routing/1/calculateRoute/” )to know the distance of specific street source (30.019572, 31.2080635) and destination (30.035858,31.214623) to collect data about specific area(neededdata are lengthInMeters, travelTimeInSeconds, trafficDelayInSeconds, departureTime, arrivalTime and routing legs ), but the distance or the length in meters is not accurate as the calculated distance from the distance rule between two points, could I know the fault comes from what? if the street is two ways not one way or the route is curvy not a straight line or there are links or intersections within the street or of what

Hi.

I’m not sure whether I understood your point.

Why do you think it is inaccurate? What do you compare the result with?
Maybe you want to know only a straight line distance?

Regards,
Mateusz