1. Download our Official Android App: Forums for Android!

Apps Find the distance between 2 Latitudes and Longitudes ?

Discussion in 'Android Development' started by Arthur Andy, Sep 8, 2011.

  1. Arthur Andy

    Arthur Andy Newbie
    Thread Starter
    Rank:
    None
    Points:
    16
    Posts:
    27
    Joined:
    Jul 5, 2011

    Jul 5, 2011
    27
    2
    16
    Hi,

    Below is the code to find distance between 2 Latitudes and Longitudes. But it is not working proper way.

    ////////////////////////////////

    public double lanLatDistance(double oldlan, double oldlat,
    double plan, double plat) {
    double R = 6371; // earth
     

    Advertisement

  2. Shocker_33

    Shocker_33 Member
    Rank:
    None
    Points:
    16
    Posts:
    65
    Joined:
    Jul 13, 2011

    Jul 13, 2011
    65
    3
    16
    androidforums
     
    #2 Shocker_33, Sep 8, 2011
    Last edited: Nov 24, 2017
  3. JiMMaR

    JiMMaR Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    363
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    363
    57
    53
    please use the
    Code (Text):
    1.  tag .. reading like this gives me headache >.<
    2.  
    3. try checking this
    4.  
    5. [URL="http://bit.ly/r7eyoO"] http://bit.ly/r7eyoO[/URL]
     

Share This Page

Loading...