You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/05/24 14:57:05 UTC

[GitHub] [cordova-plugin-geolocation] breautek edited a comment on issue #155: Timestamp of getCurrentPosition wrong? (iOS 12)

breautek edited a comment on issue #155: Timestamp of getCurrentPosition wrong? (iOS 12)
URL: https://github.com/apache/cordova-plugin-geolocation/issues/155#issuecomment-495664427
 
 
   > You have an option (maximumAge) for exactly that
   
   Note quite. You can see the javascript callback for `getCurrentPosition` on starting on [line 79](https://github.com/apache/cordova-plugin-geolocation/blob/6fd784740cd232277284933811d08f9c74f33c22/www/geolocation.js#L79) 
   
   If `maximumAge` is set and greater than 0, it will use a cache if the cached GPS point is within the acceptable age. A value of 0 means the phone will always go to the native side to request a GPS point. It doesn't guarantee you will get a "completely fresh" GPS point. 
   
   I think it's worth noting that receiving a completely fresh GPS point (within milliseconds that is) will be incredibly rare, if not impossible. GPS receivers in most phones only give location updates roughly every 1 second. Then you have overhead of receiving and handling the GPS code in the native code, and of course calling back to the javascript. 
   
   A GPS point you receive will always be sometime in the past. A healthy GPS connection should give you on average GPS point of where the phone was 1 second ago.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org