-
Notifications
You must be signed in to change notification settings - Fork 662
Description
I am testing some new rewrites of my code for geolocation and am noticing some peculiliar things and hoping others can help explain.
For both getCurrentPositions() and watchPosition() I use same following options:
var geoOptions = { maximumAge: 10000, timeout: 10000, enableHighAccuracy: true };
-
When app is deployed to iOS Simulator and physical iPhone the
watchPosition()fires a 4 times (every time) and then on the 4th call I get a timeout which is triggers my onError callback. The specific error message isCode: 3, Message: Position retrieval timed out. After 1 timeout, watchPosition() stops and does not resume. This happens on fresh install of app on either type and with simply deploying the app again (overwriting the current installed one. On physical devices and Android simulator this is not happening - I see it firing about once per second (***) continuously. -
When deployed a real device, watchPosition() seems to be firing every second even though my device is plugged and sitting on and not moving. How exactly is watchPosition working? I assume it would only trigger if it detected an actual movement, but my debugging shows the same coordinates every time it fires.
-
Is there a way to slow down the watchPosition to only "check" once per 10 seconds...I don't need extreme "watching" in my app but I do need to try and update the users coordinates at certain intervals.
-
Last, how intensive is
enableHighAccuracyon the device as well as what are others experiences when not using it - the disabledHIghAccuraccy coordinates versus the enableHighAccurracy coordinates? Is there really a significant difference?
Thanks.