I need to know the accurate distance of two locations (latlng). I did JSON and sphericalutil.computedistancebetween but their results are way too different. Like this instance, when I get the distance bet. two location in JSON the result is 9.8 km and in sphericalutil.computedistancebetween 9.18 km I know that spherical util results to meters I just converted it to KM. I'll be waiting for answers and please explain to me what is the difference of the two. Hoping for answers. Thank you so much.
The Google Directions API returns the route between two points, and thus, the distance returned takes into account the route returned (driving route for example).
The SphericalUtil.computeDistanceBetween computes the distance between two points as the shortest distance on Earth between two LatLng
s. This is, the sortest path (arc on the reference ellipsoid) between two points, not taking routes into account.