I want to get the distance from A to B by latlng.When i run my app with the following code,it return a wrong result. Fx i tryed A( 31.172740,115.0081630) ,then B(30.6055980,
There is an api provided by android itself to get distance between two points. Use:
Location.distanceBetween( startLatitude, startLongitude, endLatitude, endLongitude, results);
which returns distance in meters.