Hello,
thank you for your feedback. Our plugin calculates the mathematical distance as a direct line between two points, while the Google maps provide you with the distance on the automobile or pedestrian roads. The latter is certainly longer. Why we don’t calculate the real distance along the roads? We do this for speed – a search request may return hundreds of results. It may take a second to calculate the road distance from A to B, but it’ll have a significant delay if we have multiple results. It will also require more API requests from your site to the Google Maps that will result in higher expenses.
So, to sum it up: if we need to get the exact distance along the roads, we should ask the Google maps to build the route between the point A (the search request) to points B1, B2, B3 … B100 … B1000 etc (our locations from the locator database). So we would need to send 100s of API requests to the Google Maps on this one locator request which will take time and money. With the current mathematical approach, we simply ask the Google Maps about the geo coordinates of the point A, then we calculate the mathematical distance between these coordinates of the point A, and the coordinates of our locations B1, B2 … which are already known since you already geocoded them. It’s a simple and quick function. Although its result is shorter than the real car trip, it still allows to rank the results by distance less or more close to reality.
I hope it helps!