geolocation watchPosition timeout
while implementing geolocation watchPosition functionality, i discovered an issue i experience with FF only.
after a success position is returned, the FF implementation of the geolocation spec should watch for position changes but instead fires a TIMEOUT. it seems as though the the timer is not being cancelled and reset after a successful position acquisition, and so it times out and may/or may not be cancelling system events to watch for further changes in position.
i included a simple example in the field below. the example returns SUCCESS upon finding the initial position, and then 10 seconds later (as specified by the timeout option) returns ERROR. no further attempts for a position are made.
in both chrome & safari, this returns SUCCESS multiple times.
Выбранное решение
Good work brewster! :)
I was going to say file a bug about this issue on bugzilla but there appears to be 5 different ones already filed. Check them out and see which one best fits your situation. Maybe you can add a comment to one of the bugs if you have some info that will help.
- Bug 732923 - Geolocation in extension: watched position is updated not frequently enough, and with large timeout
- Bug 732923 - Timeout is always being triggered on watchPosition (geolocation)
- Bug 732928 - When calling navigator.geolocation.getCurrentPosition(), it will fail on timeout if a previous request has been made with a timeout option.
- Bug 683472 - geolocation has trouble dealing with simultaneous calls to getCurrentPosition() and watchPosition()
- Bug 492582 - Error [nsIDOMGeoGeolocation.watchPosition] when setting geo.enabled to false
Все ответы (2)
Выбранное решение
Good work brewster! :)
I was going to say file a bug about this issue on bugzilla but there appears to be 5 different ones already filed. Check them out and see which one best fits your situation. Maybe you can add a comment to one of the bugs if you have some info that will help.
- Bug 732923 - Geolocation in extension: watched position is updated not frequently enough, and with large timeout
- Bug 732923 - Timeout is always being triggered on watchPosition (geolocation)
- Bug 732928 - When calling navigator.geolocation.getCurrentPosition(), it will fail on timeout if a previous request has been made with a timeout option.
- Bug 683472 - geolocation has trouble dealing with simultaneous calls to getCurrentPosition() and watchPosition()
- Bug 492582 - Error [nsIDOMGeoGeolocation.watchPosition] when setting geo.enabled to false
ha! i thought the bug filing process for FF seemed a bit 'Joe User'! I did a search on the forum for watchPosition that came up empty but now i know to use bugzilla! thanks... i have never filed a FF bug before. :)