2

I am using getCurrentPositionAsync() form expo-location to get user current location.

Requests for one-time delivery of the user’s current location. Depending on given accuracy option it may take some time to resolve, especially when you’re inside a building.

As per above info from expo documentation, getCurrentPositionAsync() returns the current location of the user. But I have observed in my React-Native app that getCurrentPositionAsync() returns some other locations when I request for current location.

Hence, I would like to know that, Are there any chances that getCurrentPositionAsync() can return cached location as well?

ThinkAndCode
  • 1,319
  • 3
  • 29
  • 60

1 Answers1

0

In my case I have used getCurrentPositionAsync() with accuracy: 6 and every you request the location, expo gives you a different even if you stay in the same position. The coordenates can variate with the true coordenates for 3m, 8m and sometimes for more of 15m.

Brandonjgs
  • 194
  • 2
  • 10
  • It's ok if the discrepancy is in meters. But in my case it is in kilometre. This is where I got doubt that if `getCurrentPositionAsync()` taking cache location.Are there any chances for that? – ThinkAndCode Jan 11 '22 at 07:18
  • have you ever try with another device? getCurrentPositionAsync() takes the current position even if the device its offline. To me sometimes gives me a difference of more of 20m but that was because a location was null when I was trying to compare it. – Brandonjgs Jan 11 '22 at 18:33
  • Actually this is happening with three different devices and all the devices are online only. – ThinkAndCode Jan 16 '22 at 15:33