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

Remi Boardman commented on CB-13604:
------------------------------------

I'm still able to consistently reproduce this issue on several devices.

I've since switched to using the {{watchPosition}} method which is consistenly 
more accurate, however I don't actually need to know the position in realtime 
and this may have a negative impact on battery life.

While using {{getPosition}} in an interval I did noticed the following warning 
violation in console {{Only request geolocation information in response to a 
user gesture.}}. That's what prompted me to use {{watchPosition}} instead, 
however I still see that warning from time to time while using 
{{watchPosition}}. I presume {{watchPosition}} also requests the location in an 
interval as I was doing manually. It'd be nice if {{watchPosition}} had a 
frequency option.

> Returned location coordinates are very inaccurate after requesting location 
> for a period of time while not connected to wifi
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-13604
>                 URL: https://issues.apache.org/jira/browse/CB-13604
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-ios, cordova-plugin-geolocation
>    Affects Versions: 7.0.1
>         Environment: OS X 10.12.5
> iOS 10.1.1 iPhone 6s
> Android 7.0 Motorola G4
> Ionic v1 (latest)
>            Reporter: Remi Boardman
>              Labels: accuracy, android, geolocation, ios
>
> While requesting a location every 10 seconds using an interval, I 
> consistently see the accuracy of returned positions suddenly jump to several 
> kilometers. The lat/long of each location request in my App is saved to an 
> external database and is then used to update the marker position on a web 
> based Google Map. At first the marker is in exactly the right place then 
> after several minutes it becomes wildly inaccurate. 
> To debug this I saved the accuracy of each location request to an array and 
> each time I tested, the accuracy began at around 10-65 metres then jumped to 
> around 2km on Android and over 10km on iOS after around 6-7 minutes 
> consistently. The returned coordinates continue to be very inaccurate for 
> several minutes and then return to between 10-65 metres.
> Here is a subset of the location accuracy array on iOS when the issue is 
> present, each line is the returned accuracy in metres; 10 seconds apart:
> {quote}
> [   
>    65,
>    65,
>    65,
>    65,
>    10079,
>    10079,
>    10079,
>    10079
> ]
> {quote}
> As far as I can tell, this issue is only present when the device is not 
> connected to a wifi network. I can reproduce this behaviour on both iOS and 
> Android, while inside and stationary, and while travelling on foot with line 
> of sight to the sky. I have ensured the app remains in the foreground while 
> testing and the device/screen is awake. I make no changes to the App or 
> device when the accuracy decreases.
> I have tried with and without {{enableHighAccuracy}} enabled and the 
> behaviour does not change. I have {{maximumAge}} set to zero and a 
> {{timeout}} of 10000 milliseconds.
> I am using {{navigator.geolocation.getCurrentPosition}} for each request. 
> {{watchPosition}} does not suit my purpose because I am only updating the 
> database with returned coordinates every 10 seconds.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to