在 Android 中,当使用距离之间的数学方法时,它返回 0.0kms
还有方法之间的距离..请帮助我...永远感谢..
我正在为我的最终项目而奋斗
double distance
Location locationA = new Location(“point A”)
locationA.setLatitude(latA);
locationA.setLongitude(lngA);
Location locationB = new Location(“point B”);
locationB.setLatitude(latB);
LocationB.setLongitude(lngB);
distance = locationA.distanceTo(locationB);
http://developer.android.com/reference/android/location/Location.html