title: How to Sort Geo-points according to the distance from current location in Android
body: <p>I have a "Place" object with a LatLng coordinate for each:</p>
  
  <pre><code>import com.google.android.gms.maps.model.LatLng;
  
  public class Place{
      public String name;
      public LatLng latlng;
  
      public Restaurant(String name, LatLng latlng) {
          this.name = name;
          this.latlng = latlng;
      }
  }
  </code></pre>
  
  <p>and I have an ArrayList of these Places, something like this:</p>
  
  <pre><code>    ArrayList&lt;Place&gt; places = new ArrayList&lt;Place&gt;();
      places.add("Place 1", LatLng(90.0,90.0));
      places.add("Place 2", LatLng(93.0,93.0));
      places.add("Place 3", LatLng(83.0,92.0));
      places.add("Place 4", LatLng(93.0,91.0));
  </code></pre>
  
  <p>and I have "my" LatLng:</p>
  
  <pre><code>    LatLng myLocation = new LatLng(10.0,10.0);
  </code></pre>
  
  <p>How can I sort these objects according to closest to me? Thanks for the help</p>