aboutsummaryrefslogtreecommitdiff
path: root/api1/pl.treksoft.kvision.cordova/-geolocation/watch-position.html
blob: 31873a54243191bdd522f49e1ee24ff636872e1f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>Geolocation.watchPosition - kvision</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.cordova</a>&nbsp;/&nbsp;<a href="index.html">Geolocation</a>&nbsp;/&nbsp;<a href="./watch-position.html">watchPosition</a><br/>
<br/>
<h1>watchPosition</h1>
<a name="pl.treksoft.kvision.cordova.Geolocation$watchPosition(kotlin.Boolean, kotlin.Number, kotlin.Number, kotlin.Function1((pl.treksoft.kvision.cordova.Result((pl.treksoft.kvision.cordova.Position, pl.treksoft.kvision.cordova.GeolocationException)), kotlin.Unit)))"></a>
<code><span class="keyword">suspend</span> <span class="keyword">fun </span><span class="identifier">watchPosition</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.cordova.Geolocation$watchPosition(kotlin.Boolean, kotlin.Number, kotlin.Number, kotlin.Function1((pl.treksoft.kvision.cordova.Result((pl.treksoft.kvision.cordova.Position, pl.treksoft.kvision.cordova.GeolocationException)), kotlin.Unit)))/enableHighAccuracy">enableHighAccuracy</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;true<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.cordova.Geolocation$watchPosition(kotlin.Boolean, kotlin.Number, kotlin.Number, kotlin.Function1((pl.treksoft.kvision.cordova.Result((pl.treksoft.kvision.cordova.Position, pl.treksoft.kvision.cordova.GeolocationException)), kotlin.Unit)))/timeout">timeout</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html"><span class="identifier">Number</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.cordova.Geolocation$watchPosition(kotlin.Boolean, kotlin.Number, kotlin.Number, kotlin.Function1((pl.treksoft.kvision.cordova.Result((pl.treksoft.kvision.cordova.Position, pl.treksoft.kvision.cordova.GeolocationException)), kotlin.Unit)))/maximumAge">maximumAge</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-number/index.html"><span class="identifier">Number</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.cordova.Geolocation$watchPosition(kotlin.Boolean, kotlin.Number, kotlin.Number, kotlin.Function1((pl.treksoft.kvision.cordova.Result((pl.treksoft.kvision.cordova.Position, pl.treksoft.kvision.cordova.GeolocationException)), kotlin.Unit)))/resultCallback">resultCallback</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><a href="../-result/index.html"><span class="identifier">Result</span></a><span class="symbol">&lt;</span><a href="../-position/index.html"><span class="identifier">Position</span></a><span class="symbol">,</span>&nbsp;<a href="../-geolocation-exception/index.html"><span class="identifier">GeolocationException</span></a><span class="symbol">&gt;</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">?</span></code>
<p>Watch location changes.</p>
<h3>Parameters</h3>
<p><a name="enableHighAccuracy"></a>
<code>enableHighAccuracy</code> - provides a hint that the application needs the best possible results</p>
<p><a name="timeout"></a>
<code>timeout</code> - the maximum length of time (milliseconds) that is allowed to pass before getting the result</p>
<p><a name="maximumAge"></a>
<code>maximumAge</code> - accept a cached position whose age is no greater than the specified time in milliseconds</p>
<p><a name="resultCallback"></a>
<code>resultCallback</code> - a callback function receiving the result</p>
<p><strong>Return</strong><br/>
watch identifier (can be removed with a <a href="clear-watch.html">clearWatch</a> function)</p>
</BODY>
</HTML>