public class GLocation extends java.lang.Object implements IGLocation
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACC |
static java.lang.String |
ALT |
static java.lang.String |
BEARING |
static java.lang.String |
LAT |
static java.lang.String |
LNG |
static java.lang.String |
SPD |
static java.lang.String |
TAG |
static java.lang.String |
TIME |
Constructor and Description |
---|
GLocation() |
GLocation(android.location.Location location) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
GLocation |
fromJson(java.lang.String json) |
float |
getAccuracy() |
double |
getAltitude() |
float |
getBearing() |
double |
getLatitude() |
double |
getLongitude() |
float |
getSpeed() |
long |
getTime() |
int |
hashCode() |
void |
setAccuracy(float accuracy) |
void |
setAltitude(double altitude) |
void |
setBearing(float bearing) |
void |
setLatitude(double latitude) |
void |
setLongitude(double longitude) |
void |
setSpeed(float speed) |
void |
setTime(long time) |
org.json.JSONObject |
toJson()
Get location as JSON object
|
java.lang.String |
toString() |
public static final java.lang.String TAG
public static final java.lang.String LNG
public static final java.lang.String LAT
public static final java.lang.String ALT
public static final java.lang.String ACC
public static final java.lang.String SPD
public static final java.lang.String BEARING
public static final java.lang.String TIME
public GLocation()
public GLocation(android.location.Location location)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public org.json.JSONObject toJson()
toJson
in interface IGLocation
public GLocation fromJson(java.lang.String json)
fromJson
in interface IGLocation
public double getLongitude()
getLongitude
in interface IGetGLocation
public double getLatitude()
getLatitude
in interface IGetGLocation
public double getAltitude()
getAltitude
in interface IGetGLocation
public float getAccuracy()
getAccuracy
in interface IGetGLocation
public float getSpeed()
getSpeed
in interface IGetGLocation
public float getBearing()
getBearing
in interface IGetGLocation
public long getTime()
getTime
in interface IGetGLocation
public void setLongitude(double longitude)
setLongitude
in interface IGLocation
public void setLatitude(double latitude)
setLatitude
in interface IGLocation
public void setAltitude(double altitude)
setAltitude
in interface IGLocation
public void setAccuracy(float accuracy)
setAccuracy
in interface IGLocation
public void setSpeed(float speed)
setSpeed
in interface IGLocation
public void setBearing(float bearing)
setBearing
in interface IGLocation
public void setTime(long time)
setTime
in interface IGLocation