Location

data class Location(val latitude: Double, val longitude: Double, val accuracyMeters: Float? = null, val altitude: Double? = null, val altitudeAccuracyMeters: Float? = null, val mslAltitude: Double? = null, val mslAltitudeAccuracyMeters: Float? = null, val speedMetersPerSeconds: Float? = null, val bearing: Float? = null, val time: Long? = null, val provider: String? = null)

A generic model that represents a user location.

Constructors

Link copied to clipboard
constructor(latitude: Double, longitude: Double, accuracyMeters: Float? = null, altitude: Double? = null, altitudeAccuracyMeters: Float? = null, mslAltitude: Double? = null, mslAltitudeAccuracyMeters: Float? = null, speedMetersPerSeconds: Float? = null, bearing: Float? = null, time: Long? = null, provider: String? = null)

Properties

Link copied to clipboard
val accuracyMeters: Float? = null

Horizontal accuracy of the latitude and longitude, in meters. If not available, it will be null.

Link copied to clipboard
val altitude: Double? = null

Altitude of this location, in meters above the WGS84 reference ellipsoid.

Link copied to clipboard

Vertical accuracy of the altitude, in meters. If not available, it will be null.

Link copied to clipboard
val bearing: Float? = null

Bearing of the user, in degrees. If not available, it will be null.

Link copied to clipboard

Latitude, in degrees.

Link copied to clipboard

Longitude, in degrees.

Link copied to clipboard
val mslAltitude: Double? = null

Altitude of this location, in meters above the Mean Sea Level

Link copied to clipboard

Vertical accuracy of the mslAltitude, in meters. If not available, it will be null.

Link copied to clipboard
val point: Point

Returns a Point representation of this location.

Link copied to clipboard
val provider: String? = null

Provider that generated this location.

Link copied to clipboard

Speed of user in meters per second. If not available, it will be null.

Link copied to clipboard
val time: Long? = null

Date time of this location fix. This value is in milliseconds since epoch (1970-01-01T00:00:00Z) in UTC.

Functions

Link copied to clipboard

Converts our generic MapLibre location to an Android platform location.