Search This Blog

Tuesday, 21 August 2012

How to calculate distance between two GeoLocations in Blackberry

Hello Friends,
                        Here is the simplet yet useful trick to calculate distance between two geolocations ....I have an idea in my mind and a simple straight answer to android's newest feature ....just wait and watch....nothing to loose in trying.....I am coming up with something Big for BB.


Suppose you have cordinates a and b:

Coordinates A = new Coordinates(43.99,-80.71,float.NaN);
Coordinates B = new Coordinates(34.21,-76.43,float.NaN);

float distance = A.distance(B)/1000;

Done....Try this....

No comments:

Post a Comment