Skip to content

Expected behavior from watchPosition timeouts and high accuracy #287

@rolinger

Description

@rolinger

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 };

  1. 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 is Code: 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.

  2. 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.

  3. 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.

  4. Last, how intensive is enableHighAccuracy on 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions