Why is my current location different from Google Maps and the Location Services API?

The blue icon that represents the current location on the map is different from the location I get from the Location Services API.

googleApiClient = new GoogleApiClient.Builder(getApplicationContext())
        .addApi(LocationServices.API)
        .addConnectionCallbacks(new CustomConnectionCallbacks())
        .build();

locationRequest = new LocationRequest();
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
locationRequest.setInterval(1000);
locationRequest.setFastestInterval(1000);

LocationServices.FusedLocationApi.requestLocationUpdates(
    googleApiClient, 
    locationRequest, 
    new CustomLocationListener()
);

      

I'm trying to set a marker exactly where the user is, but when I use the last known location from the Location Services API, the marker is at a different position 25% of the time.

Is Google Maps being used by Google Services APIs? Am I using the correct configuration?

+3
android google-maps-android-api-2 google-location-services


source to share


No one has answered this question yet

Check out similar questions:

5641
What is the difference between "px", "dip", "dp" and "sp"?
1177
What is the difference between match_parent and fill_parent?
1152
Difference between gravity and layout_gravity on Android
23
Animation of markers on Google Maps V2
18
Google Maps Android api v2 and current location
7
Google Location API requires internet?
1
How to make the default Google Maps current location icon smoother
1
Implementing the Google Geolocation Services API within a service
0
How to remove / disable circle of accuracy from current location in Google Maps for Android
0
Using location services is not as fast as google-map



All Articles
Loading...
X
Show
Funny
Dev
Pics