0

I am using Flutter to write my running app likes Strava. In this app, I used location and google maps plugin for flutter. Everything is good until I call getCurrentLocation every 10s to track my location and receive different LatLng even if I stand still. Did anybody here face the same problem? I think it probably cause by the GPS's accuraccy issue.

  • Look here - https://stackoverflow.com/questions/41805990/android-location-going-for-a-walk-by-itself/41833239#41833239 – TDG Feb 29 '20 at 08:43

1 Answers1

0

Every few seconds, Android (and ios) gets a new location by either connect to cell towers or connecting to gps satellites. Based on that data it determines the most likely location for you on the globe. Since these measurements are not 100% accurate, every time it recalculates the users location, there will be a slight difference in location. Even if you stand still, your lat-lng values will change slightly. That is normal. You can decide to discard the new value if it is too close to the previous one. maps_toolkit is a good library for calculating the distance between two locations.

Joran
  • 154
  • 1
  • 10