[Android] GPS 좌표값 두 개의 거리 구하기

2014. 8. 11. 22:29Programming/Android

반응형

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);

반응형