4

I am writting an application to tracks users real time location and show it on map. However the results I am seeing are not satisfactory. When I compare my app with others present on play store the difference is a lot.

Here are the things which I have tried so far: (Just in case I am using Xamarin to build this application)

I have earlier used Fused Location Api, this gave too much of deviation from users current location. So, I tried with Location Manager using only GPS_Provider. Using this the accuracy increased a lot but still not perfect.

Below is my code using location manager:

protected void CreateLocationRequest() {
            if (locMgr.AllProviders.Contains (LocationManager.GpsProvider) && locMgr.IsProviderEnabled (LocationManager.GpsProvider)) {
                locMgr.RequestLocationUpdates (LocationManager.GpsProvider, 3000, 2, this);
            } 
        }

public void OnLocationChanged (Location location)
        {
            Console.WriteLine ("OnLocationChanged");
            if(location != null && location.Accuracy <= 20){
                drawPath (location);
            }
        }

Below is the screen shot of my application:

enter image description here

Below is the screenshot of an app from playstore

enter image description here

Ismail Khan
  • 93
  • 1
  • 10
  • Did you record both tracks with the same device? – greenapps Aug 31 '15 at 07:16
  • @greenapps yes tracked with same device – Ismail Khan Aug 31 '15 at 07:23
  • 'Below is my code using location manager:'. But you do not use 'location' so what are you doing with it? Calculating distances is irrelevant i think. – greenapps Aug 31 '15 at 07:24
  • @greenapps i am basically caculating the distance and drawing the polyline. Just the normal stuff – Ismail Khan Aug 31 '15 at 07:25
  • Why are you calculating a distance? Ok i can imagine why. But we are not interested in distance i think. You better show us how you take the lat,lon from location and how you use that to plot the points. – greenapps Aug 31 '15 at 07:28
  • @greenapps I am adding the polyline as it is. I am not doing any extra checks on location obtained. Except for checking its accuracy – Ismail Khan Aug 31 '15 at 09:18
  • From the screenshot i didn't observed much difference in accuracy , in ur screen it shown more curved may be because you enabled the Polyline attributre Geodesic. – Suchith Sep 05 '15 at 11:20

0 Answers0