How to calculate the distance between the two given latitude and longitude while Location onchanged method is called
<p>I have some queries regarding the using the google route map , currently iam working in Android , and the application iam developing uses
    google map , actually the apps i for Car hiring , suppose the client send the pickup add and destination add , now the dirver will get the request that ther
    is a pickup request , now supose currently driver is in some other location (A), and his pickup request is from location (B),, no i have to calculate the distance between driver location (A) and the pickup location (B) , I tried using the method given in Android Location ,but iam not getting the correct 
    distance
    I have use the  method</p>

<pre><code>float[] result=new float[5];  
myLocation.distanceBetween(ServerData.LATITUDE,ServerData.LONGITUDE, latitude,longitude,result);  
String distance=Float.toString(result[0]);  
</code></pre>

<p>here</p>

<pre><code>ServerData.LATITUDE----&gt; when the driver login sends it current location
ServerData.LONGITUDE

latitude--- &gt; is the location moving towards the pickup point
 longitude
</code></pre>

<p>can any one suggest how to do I am stuck with it</p>
