com.supermap.ar
Class GeoObject
- java.lang.Object
-
- com.supermap.ar.ArObject
-
- com.supermap.ar.GeoObject
-
public class GeoObject extends ArObject
AR geometry object class. Inherits from ArObject.
-
-
Constructor Summary
Constructors Constructor and Description GeoObject()The constructor.GeoObject(long id)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculateDistanceMeters(double longitude, double latitude)Calculates the distance between the current object to another one.doublecalculateDistanceMeters(GeoObject geo)Calculates the distance between the current object to another one.doublegetAltitude()Gets the altitudedoublegetLatitude()Gets the latitudedoublegetLongitude()Gets longitudevoidsetGeoPosition(double latitude, double longitude)Sets the geometry object positionvoidsetGeoPosition(double latitude, double longitude, double altitude)Sets the geometry object positionvoidsetLocation(android.location.Location location)Sets the geometry object position-
Methods inherited from class com.supermap.ar.ArObject
getAngle, getBottomLeft, getBottomRight, getDistanceFromUser, getId, getInfo, getName, getPosition, getTopLeft, getTopRight, isVisible, setAngle, setAngle, setDistanceFromUser, setInfo, setName, setPosition, setPosition, setVisible
-
-
-
-
Constructor Detail
-
GeoObject
public GeoObject(long id)
The constructor. Creates an AR object which has unique ID.- Parameters:
id- ID
-
GeoObject
public GeoObject()
The constructor.
-
-
Method Detail
-
setGeoPosition
public void setGeoPosition(double latitude, double longitude)Sets the geometry object position- Parameters:
latitude- Latitudelongitude- Longitude
-
setGeoPosition
public void setGeoPosition(double latitude, double longitude, double altitude)Sets the geometry object position- Parameters:
latitude- Latitudelongitude- Longitudealtitude- Altitude
-
getLongitude
public double getLongitude()
Gets longitude- Returns:
- The longitude
-
getAltitude
public double getAltitude()
Gets the altitude- Returns:
- the altitude
-
getLatitude
public double getLatitude()
Gets the latitude- Returns:
- The latitude
-
setLocation
public void setLocation(android.location.Location location)
Sets the geometry object position- Parameters:
location- Location information
-
calculateDistanceMeters
public double calculateDistanceMeters(GeoObject geo)
Calculates the distance between the current object to another one. Unit: meter- Parameters:
geo- Another object- Returns:
- distance
-
calculateDistanceMeters
public double calculateDistanceMeters(double longitude, double latitude)Calculates the distance between the current object to another one. Unit: meter- Parameters:
longitude- Longitudelatitude- Latitude- Returns:
- distance
-
-