I need to calculate distance between two locations.I have longitudes and latitudes for both location.So i need to know how to use distanceBetween method to calculate distance between them ?
I mean on what object should i call distanceBetween method ?
when this programm runs it display the current location.When i going to search location it gives me a problen.because when distanceBetween method run on null location.see the code.
location.distanceBetween(latitudeE6,longitudeE6, SearchlatitudeE6, SearchlongitudeE6,result);
And yet, it says so right there. If you don't know what WGS84 (or the bearing it defines) is - its Wikipedia page would be a good starting point to learn about it.
Anyway when i search distance from this the 0th element give me 1.1317398E7.So the distance should be is 1.317 Km.
1)Is it correct ?
2)I think this is shortest distance.When i check using google map the distance is 2.8 Km.I think this is happen Google map get distance from road wise.Anyway i need to calculate distance road wise.is it possible ?