Class POBLocation
-
- All Implemented Interfaces:
public class POBLocationA data class representing a geographic location consist of latitude, longitude and location source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPOBLocation.SourceEnum to define the location source.
-
Field Summary
Fields Modifier and Type Field Description public longlastFixInMillispublic floataccuracypublic doublelatitudepublic doublelongitudepublic POBLocation.Sourcesource
-
Constructor Summary
Constructors Constructor Description POBLocation(POBLocation.Source locationSource, double latitude, double longitude)Instantiate an object of POBLocation using the location source defined Source POBLocation(Location location)Instantiate an object of POBLocation using the Android's default location object
-
Method Summary
Modifier and Type Method Description longgetLastFixInMillis()Return the time of this fix, in elapsed real-time since system boot. floatgetAccuracy()Returns estimated location accuracy in meters when lat/lon are specified and derived from a device's location services (i.e., type = 1). doublegetLatitude()Returns the latitude, in degrees. doublegetLongitude()Returns the longitude, in degrees. POBLocation.SourcegetSource()Returns the source of the location. -
-
Constructor Detail
-
POBLocation
POBLocation(POBLocation.Source locationSource, double latitude, double longitude)
Instantiate an object of POBLocation using the location source defined Source- Parameters:
locationSource- location sourcelatitude- accepts latitude of the locationlongitude- accepts longitude of the location
-
POBLocation
POBLocation(Location location)
Instantiate an object of POBLocation using the Android's default location object- Parameters:
location- Android's default location object
-
-
Method Detail
-
getLastFixInMillis
long getLastFixInMillis()
Return the time of this fix, in elapsed real-time since system boot.
- Returns:
Last Fix in milli seconds
-
getAccuracy
float getAccuracy()
Returns estimated location accuracy in meters when lat/lon are specified and derived from a device's location services (i.e., type = 1). Note that this is the accuracy as reported from the device.
- Returns:
Estimated location accuracy in meters
-
getLatitude
double getLatitude()
Returns the latitude, in degrees.
All locations generated by the LocationManager will have a valid latitude.
- Returns:
provides latitude of the location
-
getLongitude
double getLongitude()
Returns the longitude, in degrees.
All locations generated by the LocationManager will have a valid longitude.
- Returns:
provides longitude of the location
-
getSource
@Nullable() POBLocation.Source getSource()
Returns the source of the location.
- Returns:
location source
-
-
-
-