1

I'm working with Androids FusedLocationApi to receive periodically location updates and display the current location on GoogleMaps.
I know that the accuracy can be inaccurate from time to time and thus make big sidesteps on my way down the street.

LocationRequest locationRequest = new LocationRequest();
locationRequest.setInterval(5 * 1000);
locationRequest.setFastestInterval(2 * 1000);
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
locationRequest.setSmallestDisplacement(5);

LocationServices.FusedLocationApi.requestLocationUpdates(this.mGoogleApiClient, locationRequest, this);

When standing still I get still sometimes locations with a high accuracy value and a wrong location (Yeah, that is normal I'm aware of that).
But GoogleMaps does not change the location marker, but updates the accuracy radius around that point.

So how do i know when i should really move the marker to the next location instead of moving on every update (what produces a lot of jumps in a building)? Not every location has a speed value to use.

Anyone who fought that problem and fixed it?

Kyaak
  • 41
  • 4

0 Answers0