incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <>
Subject [jira] [Updated] (CB-55) Geolocation.prototype.watchPosition uses timeout option in wrong way
Date Thu, 03 May 2012 01:21:48 GMT


Shazron Abdullah updated CB-55:

    Fix Version/s: 1.8.0
> Geolocation.prototype.watchPosition uses timeout option in wrong way
> --------------------------------------------------------------------
>                 Key: CB-55
>                 URL:
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>             Fix For: 1.8.0
> reported at:
> by:
> 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:!default.jspa
For more information on JIRA, see:


View raw message