ISSUE-84: The timer behavior in the watchPosition algorithm is incorrectly described.
Watch timer behavior
The timer behavior in the watchPosition algorithm is incorrectly described.
- State:
- CLOSED
- Product:
- GeoAPI V1
- Raised by:
- Andrei Popescu
- Opened on:
- 2009-12-07
- Description:
- The spec says about the watchPosition (step 5.3) that:
"Else, if the location acquisition operation reports an error before the timeout expires, invoke the errorCallback (if present) with a new PositionError object whose code is set to POSITION_UNAVAILABLE. This step can be subject to callback rate limitation (see below)."
Note that the pending timer is not canceled. This is correct, since a new movement may be detected and a position can still be successfully acquired withing the given timeout period. However, the problem is that, in step 6, the spec says when a new movement is detected, the "acquisition steps" must be rerun from the beginning. But step 1 is:
"Start a timer that will fire after the number of milliseconds denoted by the value of the timeout variable (...)"
So a new timer will be started every time movement is detected, leaving the old timer potentially running (i.e. if the last acquisition operation failed).
The solution is to make it clear in step 1 that a new timer needs to be started only if an existing timer isn't already running. - Related Actions Items:
- No related actions
- Related emails:
- No related emails
Related notes:
Fixed in http://dev.w3.org/cvsweb/geo/api/spec-source.html.diff?r1=1.82&r2=1.83&f=h
Andrei Popescu, 7 Dec 2009, 12:42:53Display change log