Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
Description
reported at: https://github.com/phonegap/phonegap-iphone/issues/305
by: https://github.com/all4ip
I have following scenario:
I want aprox. every second a position update. I do not want cached positions. I am willing to wait up to 30 seconds for the first valid position.
So my params would be:
var options =
;
This is identical to w3c definition.
But the timout value is also used for the internal endless loop of watchPosition. So I can either have updates every second and can wait up to 1 second for valid position or wait up to 30 seconds for valid position and get updates only every 30 seconds, too!
The timout option should be used like the doc says:
"The maximum length of time (msec) that is allowed to pass from the call to geolocation.getCurrentPosition or geolocation.watchPosition until the corresponding geolocationSuccess callback is invoked."
This happens correctly, when the params are passed to getCurrentPosition().
But the continuous update in watchPosition uses the same value for the timer, too:
setInterval(intervalFunction, params.timeout);
The interval should be a static value i.e. 1000 ms or 500 ms or a variable frequency.
Attachments
Issue Links
- depends upon
-
CB-359 Update geolocation plugin to adhere to W3C specification
- Closed