Coords class
Location coordinates (eg: latitude
, longitude
, accuracy
, speed
, heading
, etc.
BackgroundGeolocation.onLocation((Location location) {
double accuracy = location.coords.accuracy;
double lat = location.coords.latitude;
double lng = location.coords.longitude;
double speed = location.coords.speed;
double heading = location.coords.heading;
double altitude = location.coords.altitude;
print("[onLocation] $location");
});
State state = await BackgroundGeolocation.ready(Config(
distanceFilter: 10.0
));
Location location = await BackgroundGeolocation.getCurrentPosition();
print("[getCurrentPosition] location: $location");
Constructors
- Coords(dynamic coords)
Properties
- accuracy ↔ double
-
Accuracy in meters.
getter/setter pair
- altitude ↔ double
-
iOS
Altitude above sea-level in meters.Android
The altitude of this location in meters above the WGS84 reference ellipsoid.getter/setter pair - altitudeAccuracy ↔ double
-
Altitude accuracy in meters.
getter/setter pair
- ellipsoidalAltitude ↔ double
-
The altitude of this location in meters above the WGS84 reference ellipsoid.
getter/setter pair
- floor ↔ int?
-
[iOS Only]
The current floor within a building. Only works in an environment containing indoor-tracking hardware (eg: bluetooth beacons).getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- heading ↔ double
-
Heading in degrees.
⚠️ Note: Only present when location came from GPS.
-1
otherwise.getter/setter pair - headingAccuracy ↔ double
-
Heading accuracy in degrees.
⚠️ Note: Only present when location came from GPS.
-1
otherwise.getter/setter pair - latitude ↔ double
-
Latitude of the location.
getter/setter pair
- longitude ↔ double
-
Longitude of the location.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- speed ↔ double
-
Speed in meters / second.
⚠️ Note: Only present when location came from GPS.
-1
otherwise.getter/setter pair - speedAccuracy ↔ double
-
Speed accuracy in meters / second
⚠️ Note: Only present when location came from GPS.
-1
otherwise.getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited