LocationEngine

interface LocationEngine

Location engine that is used to fetch current location and listen to location updates.

Inheritors

GoogleLocationEngine
MapLibreLocationEngine
AppleLocationEngine

Types

Link copied to clipboard
data class Request(val minIntervalMilliseconds: Long = 1000, val maxIntervalMilliseconds: Long = 2000, val minUpdateDistanceMeters: Float = 0.0f, val maxUpdateDelayMilliseconds: Long = 1000, val accuracy: LocationEngine.Request.Accuracy = Accuracy.HIGH)

Request to configure location updates parameters

Functions

Link copied to clipboard
abstract suspend fun getLastLocation(): Location?

Get last known location. If last location is not available, this method will return null.

Link copied to clipboard
abstract fun listenToLocation(request: LocationEngine.Request): Flow<Location>

Listen to location updates.