[
https://issues.apache.org/jira/browse/CB-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shazron Abdullah updated CB-55:
-------------------------------
Fix Version/s: 1.8.0
> Geolocation.prototype.watchPosition uses timeout option in wrong way
> --------------------------------------------------------------------
>
> Key: CB-55
> URL: https://issues.apache.org/jira/browse/CB-55
> Project: Apache Callback
> Issue Type: Bug
> Components: iOS
> Reporter: Shazron Abdullah
> Fix For: 1.8.0
>
>
> 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 = { timeout: 30000, maximumAge: 0, enableHighAccuracy: true };
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira