Location

data class Location(val latitude: Double, val longitude: Double, val elevation: Double? = null, val accuracy: Double? = null, val timestamp: Long? = null, val tz: TimeZone? = null, val locationName: String? = null)

Represents a coordinate on the globe. In contrast to GeoLocation which has an associated timezone and place name, Location may not. This is to accommodate various platforms, which may not expose as rich information as GeoLocation requires.

Parameters

timestamp

epoch milliseconds when the location was last updated. On some platforms (e.g. Kotlin/JS) this can be significantly delayed (I think e.g. if the user is offline, etc.) compared to when the location flow is updated.

accuracy

the margin of error in latitude and longitude. A smaller number means the latitude and longitude are more accurate.

Constructors

Link copied to clipboard
constructor(latitude: Double, longitude: Double, elevation: Double? = null, accuracy: Double? = null, timestamp: Long? = null, tz: TimeZone? = null, locationName: String? = null)

Properties

Link copied to clipboard
val accuracy: Double? = null
Link copied to clipboard
val elevation: Double? = null
Link copied to clipboard
val latitude: Double
Link copied to clipboard
val locationName: String? = null
Link copied to clipboard
val longitude: Double
Link copied to clipboard
val timestamp: Long? = null
Link copied to clipboard
val tz: TimeZone? = null