kvision / pl.treksoft.kvision.cordova / Geolocation / watchPosition

watchPosition

(js) suspend fun watchPosition(enableHighAccuracy: Boolean = true, timeout: Number? = null, maximumAge: Number? = null, resultCallback: (Result<Position, GeolocationException>) -> Unit): String?

Watch location changes.

Parameters

enableHighAccuracy - provides a hint that the application needs the best possible results

timeout - the maximum length of time (milliseconds) that is allowed to pass before getting the result

maximumAge - accept a cached position whose age is no greater than the specified time in milliseconds

resultCallback - a callback function receiving the result

Return
watch identifier (can be removed with a clearWatch function)