Exemple #1
0
 /**
  * Returns <code>true</code> if the given LatLng point is at the same position (within a small
  * margin of error).
  *
  * @param other The other LatLng point.
  * @return Returns <code>true</code> if the given LatLng point is at the same position (within a
  *     small margin of error), <code>false</code> otherwise.
  */
 @Override
 public boolean equals(Object other) {
   if (!(other instanceof LatLng)) {
     return false;
   }
   LatLng otherLatLng = (LatLng) other;
   return equals(jsObj, otherLatLng.getJSObj());
 }
Exemple #2
0
 /**
  * Returns the distance (in meters) to the given LatLng calculated using the Haversine formula.
  *
  * @param other The other latlng.
  * @return Returns the distance to the giben LatLng.
  */
 public double distanceTo(LatLng other) {
   return distanceTo(jsObj, other.getJSObj());
 }