kvision / pl.treksoft.kvision.cordova / Locationservices

Locationservices

object Locationservices

Main geolocation object based on Google location services api.

Types

Priority

enum class Priority

Location services priority.

Functions

clearWatch

fun clearWatch(watchId: String): Unit

Clear the given watch.

getCurrentPosition

suspend fun getCurrentPosition(enableHighAccuracy: Boolean = true, timeout: Number? = null, maximumAge: Number? = null, priority: Locationservices.Priority? = null, interval: Number? = null, fastInterval: Number? = null): Result<Position, GeolocationException>

Get current location.

watchPosition

suspend fun watchPosition(enableHighAccuracy: Boolean = true, timeout: Number? = null, maximumAge: Number? = null, priority: Locationservices.Priority? = null, interval: Number? = null, fastInterval: Number? = null, resultCallback: (Result<Position, GeolocationException>) -> Unit): String?

Watch location changes.

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.