Class LCGeoPoint

java.lang.Object
cn.leancloud.types.LCGeoPoint

public class LCGeoPoint extends Object
  • Constructor Details

    • LCGeoPoint

      public LCGeoPoint()
    • LCGeoPoint

      public LCGeoPoint(double latitude, double longitude)
  • Method Details

    • getLatitude

      public double getLatitude()
    • setLatitude

      public void setLatitude(double latitude)
    • getLongitude

      public double getLongitude()
    • setLongitude

      public void setLongitude(double longitude)
    • distanceInKilometersTo

      public double distanceInKilometersTo(LCGeoPoint point)
      Get distance bw this point and another point in kilometers.
      Parameters:
      point - GeoPoint describing the other point being measured against.
      Returns:
      distance result.
    • distanceInMilesTo

      public double distanceInMilesTo(LCGeoPoint point)
      Get distance between this point and another geopoint in miles.
      Parameters:
      point - GeoPoint describing the other point being measured against.
      Returns:
      distance
    • distanceInRadiansTo

      public double distanceInRadiansTo(LCGeoPoint point)
      Get distance in radians between this point and another GeoPoint. This is the smallest angular distance between the two points.
      Parameters:
      point - GeoPoint describing the other point being measured against.
      Returns:
      distance