public double distance(LatLng ll){
  double er=6366.707;
  double latFrom=Math.toRadians(getLat());
  double latTo=Math.toRadians(ll.getLat());
  double lngFrom=Math.toRadians(getLng());
  double lngTo=Math.toRadians(ll.getLng());
  double d=Math.acos(Math.sin(latFrom) * Math.sin(latTo) + Math.cos(latFrom) * Math.cos(latTo) * Math.cos(lngTo - lngFrom)) * er;
  return d;
}

public double distance ( LatLng ll ) { double er = 6366.707 ; double latFrom = Math . toRadians ( getLat ( ) ) ; double latTo = Math . toRadians ( ll . getLat ( ) ) ; double lngFrom = Math . toRadians ( getLng ( ) ) ; double lngTo = Math . toRadians ( ll . getLng ( ) ) ; double d = Math . acos ( Math . sin ( latFrom ) * Math . sin ( latTo ) + Math . cos ( latFrom ) * Math . cos ( latTo ) * Math . cos ( lngTo - lngFrom ) ) * er ; return d ; }
calculate the surface distance in kilometres from the this latlng to the given latlng .
