Location

open class Location

A location data object. This object contains a location data, including its position point, velocity, accuracy, course etc.

Constructors

Link copied to clipboard
fun Location(    timestamp: Instant?,     position: Point,     horizontalAccuracy: Double,     verticalAccuracy: Double,     speed: Double,     course: Double,     lastKnown: Boolean)

Creates a location object with timestamp.

Link copied to clipboard
fun Location(    timestamp: Instant?,     position: Point,     horizontalAccuracy: Double,     verticalAccuracy: Double,     speed: Double,     course: Double,     lastKnown: Boolean,     additionalSourceProperties: Map<String, Any>)

Creates a location object with timestamp and additional source properties. A Location can be created from a variety of sources and using different technologies. By supplying Location.getAdditionalSourceProperties() you can allow users of this Location to find out how the data was captured.

Link copied to clipboard
fun Location(    position: Point,     horizontalAccuracy: Double,     speed: Double,     course: Double,     lastKnown: Boolean)

Creates a location object.

Types

Link copied to clipboard
object SourceProperties

A collection of well-known constants for keys and values in additionalSourceProperties

Properties

Link copied to clipboard
val additionalSourceProperties: Map<String, Any>
Link copied to clipboard
val course: Double

The course of the location in degrees clockwise, 0 being true North.

Link copied to clipboard
val horizontalAccuracy: Double

The horizontal accuracy of the location in meters.

Link copied to clipboard
val lastKnown: Boolean

Indicates whether this is an outdated device position retrieved and cached earlier and therefore not guaranteed to represent the current location.

Link copied to clipboard
val position: Point
Link copied to clipboard
val speed: Double

The speed of the location in meters per second.

Link copied to clipboard
val timestamp: Instant?
Link copied to clipboard
val verticalAccuracy: Double

The vertical accuracy of the location in meters.

Inheritors

Link copied to clipboard