ISO-8601 UTC timestamp provided by the native location API.
The age of the location in milliseconds, relative to the Device system-time when the location was received.
For example, if the reported age is 10000, that location was recorded 10s ago, relative to the system-time.
location.timestamp + location.age = Device system-time when location was recorded.
Total distance traveled, in meters, since the odometer was last set or reset.
The SDK continuously integrates distance between recorded locations to maintain a running total. This value increases regardless of tracking mode and persists across app restarts (unless explicitly reset).
ℹ️ How it's calculated:
When the odometer increases:
When it does not increase:
Resetting or setting the odometer:
0.Persistence:
State and is restored after app restart.setOdometer clears it.Best practices:
Accumulated odometer drift, in meters.
ℹ️ Why does this exist?
odometer_error value tells you how much uncertainty has accumulated in the current odometer estimate.How to use it:
odometer = 12000 and odometer_error = 40, the true travelled distance is likely within ±40 meters of the reported value.odometer_error to 0.Best practice:
odometer normally to end-users.odometer_error internally for data-quality scoring, filtering, or highlighting low-accuracy segments.true if location was recorded while plugin is in the moving state.
Universally Unique Identifier. You can use this to match locations recorded at your server with those in the logs. It can also be used to ensure if the plugin has ever posted the same location twice.
OptionaleventEvent responsible for generating this location (motionchange, providerchange, geofence, heartbeat).
OptionalmockPresent (and true) if the location was generated by a "Fake Location" application or simulator.
Optionalsampletrue if the plugin is currently waiting for the best possible location to arrive. Samples are recorded when the plugin is transitioning between motion-states (moving vs stationary) or [[BackgroundGeolocation.getCurrentPosition]].
If you're manually posting location to your server, you should not persist these "samples".
latitude, longitude, speed, heading, etc.
Device battery level when the location was recorded.
OptionalextrasOptional arbitrary meta-data attached to this location.
OptionalgeofenceIf this location was recorded due to a geofence transition, the corresponding geofence-event.
Device motion-activity when this location was recorded (eg: still, on_foot, in_vehicle).
OptionalproviderIf this location was recorded due to ProviderChangeEvent, this is a reference to the location-provider state.
A
Locationobject represents a geographic location captured by the device's native location API.CLLocationManagerdelivers instance ofCLLocationon iOSFusedLocationProviderClientdeliver instance ofandroid.location.Locationon AndroidJavascript Callback Schema
Example
HTTP POST Schema
The location-data schema POSTed to your server takes the following form:
Example