incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filip Maj (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-55) Geolocation.prototype.watchPosition uses timeout option in wrong way
Date Thu, 03 May 2012 15:50:50 GMT

    [ https://issues.apache.org/jira/browse/CB-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13267525#comment-13267525
] 

Filip Maj commented on CB-55:
-----------------------------

Don't think this issue is relevant. The suggestions made by the commenter do not adhere to
the W3C spec, especially the "ignore the significant position difference requirement".

CB-359 should resolve this anyways. The JS to be merged in is on my fork (brunt of the changes
are in the [geolocation.js module|https://github.com/filmaj/incubator-cordova-js/blob/geotests/lib/common/plugin/geolocation.js]).

The iOS changes are also on [my branch|https://github.com/filmaj/incubator-cordova-ios/tree/geoupdate].

I would suggest closing it.
                
> 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

        

Mime
View raw message