Forum Academy Marketplace Showcase Pricing Features

Distance from element. Question

I want to calculate the distance from point A to B but it should be via road distance, when i use “distance from” I get much smaller number then it should be according to Google maps.
I dont under whats the matter, is the “distance from” calculates the distance via a straight line ??

That sounds about right. If I was using a distance from operator, I would expect the software that I was using to use the Haversine formula. Mostly because distance from is different than a route distance. To further that, I can take 10 different ways to get to the same point most of the time therefore the route length would be different each time. So the easiest operation for a computer to do is to return the distance from point a to point B via a straight line and it does that through using the coordinates and entering it into the Haversine formula

I think also when I use Google I’m often offered several different routes therefore offered different route links.

To get the distance that it takes to travel via road you’ll need to use some kind of routing API like Google maps, Yandex maps, open map etc.

1 Like

Oh yes the system calculate the distance between two points through a straight line.

So I found this Google maps service

Thanks,

1 Like