• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

google map how to find distance bitween two geopoint

locationA.setLatitude(24.0179896);
locationA.setLongitude(72.4163641);


Location locationB = new Location("point B");

locationB.setLatitude(22.258652);
locationB.setLongitude(71.1923805);
System.out.println("letitude" +leti);
System.out.println("letitude " + logi );

double distance = locationA.distanceTo(locationB);

this code not give correct distance how to iget currect distence?
 
Hello and welcome to the forums - thanks for joining!

It sounds like you are asking a development question - I'm afraid I can't help, as I know nothing about development. If you head over to Android Development - Android Forums, then you should be able to get some info, as this is where our other devs hang out.

Hope you find this place useful - give one of us guides a shout if you need any more help navigating the site!!
 
Back
Top Bottom