android - Google Maps & apps with mapview have different current positions -


I have a mapview where I want to track the user's current location. GPS as well as 'wireless network access' is active in my phone settings. However, since I am indoor, I do not get GPS fixed, hence the location is determined through the network; Wifi Spot is available.

My applications are running simultaneously with Google Maps app running.

Surprisingly, the current location is different between Google Maps and my application, where Google Maps is very precise in my app, somewhat few meters away.

In my application, I basically do the following (for debugging purposes):

1) A marker on the place map initially: locationManager.getLastKnownLocation ( LocationManager.GPS_PROVIDER);

2) Initially by inserting another marker on the map: recovered by geopoint locationManager.

This will bring the last known locations of both providers to the map (eventually finally known from my app).

3) So for regular updates (since I do not have any GPS set here), I do:

  locationManager.requestLocationUpdates (LocationManager.NETWORK_PROVIDER, 0 , 0, baselection listener);  

You can see for frequency and distance, I pass the absolute zero in both cases.

In the App manifest, the following permissions are given:

  android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_MOCK_LOCATION  

Actually known as my base location, which I see in logs, but the updated location is in any way similar to the previous known current state (LocationManager.NETWORK_PROVIDER), the same latitude / LNG.

I thought I had ignored something or left no parameters or settings, or a bug in my code. That's why I installed some other (3 total) LBS apps from the Android Market that show the current user's location. The current locations displayed in those apps are equal to one in my application - and they are all 100 meters away - but at least they are all the same.

See screenshot here:

Now I am thinking:

< P> 1) As I see, I see that being ignorant is system-wide and not app-wide, why Google Maps and all other apps have a location?

2) Does Google Maps not update the last location of a provider?

3) Does Google Maps use different custom location providers (i.e. due to licensing reasons), which are in SDK other than GPS_PROVIDER or NETWORK_PROVIDER?

4) How to get the same exact result with NETWORK_PROVIDER like Google Maps?

I think I found an answer, though the solution does not seem to be that problem The data quality of different map providers is in use, which is used for map view in Google Maps and SDK, which is different.

Map tiles coordinates do not seem very accurate, just like in the public Google Maps web API / tiles

Check out this screenshot for this example, where I pinned the same geographical point

The map is a few hundred meters away using the public map API. Looks like we have to live with it? : (


Comments