locked
Current user location return from GetGeopositionAsync always several hundred meters away fromm actual location

    Question

  • When I tested my app which uses Geolocator.GetGeopositionAsync to get the current user's location, the returned coordinate is always several hundred meters away from the actual location, even if the returned PositionSource is from GPS with accuracy of several meters.

    I was using Lumia 930 as a testing tool.

    The following is my code:

    //get current location
    var geo = new Geolocator { DesiredAccuracy = PositionAccuracy.High, DesiredAccuracyInMeters = 10};
    var currentLocation = await geo.GetGeopositionAsync();
    
     //mark location on the map.
     var point=currentLocation .Coordinate.Point;
     MapIcon MapIcon1 = new MapIcon();
     MapIcon1.Location = point;
     MapIcon1.NormalizedAnchorPoint = new Point(0.5, 1.0);
     MapIcon1.Title = "I'm here";
     MapControl1.MapElements.Add(MapIcon1);
     await MapControl1.TrySetViewAsync(point, 18D, 0, 0, MapAnimationKind.Bow);

    Any idea why is this?

    Wednesday, January 21, 2015 6:47 AM

All replies

  • From an API perspective, there's not much we can do about it.  Do you know if the problem reproduces on other phones, other Lumia 930s?  Maybe there's a problem with your specific phone?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 21, 2015 1:22 PM
    Moderator
  • I have tested my phone by opening HERE Map on my phone, and it give me the right location. And When I asked cortana "Where am I?", I got the correct location too. 
    Wednesday, January 21, 2015 1:46 PM
  • Is it off the same amount with every location?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 21, 2015 1:57 PM
    Moderator
  • yes, the offset always the same.
    Wednesday, January 21, 2015 2:05 PM
  • If you remove DesiredAccuracy and increase DesiredAccuracyInMeters to 100, does it affect the location at all?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, January 21, 2015 4:05 PM
    Moderator
  • The PositionSource will change to WIFI if Wifi is available, and the location returned will be about 50 meters away from the previous one, but still about 200 meters away from the actual location.
    Wednesday, January 21, 2015 10:51 PM
  • Please post a working project to OneDrive and share a link to it here, I want to check this out.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 22, 2015 1:24 PM
    Moderator
  • Thanks for your time, Matt Small.

    Here is the link:

    http://1drv.ms/1wq2c0x

    Thursday, January 22, 2015 2:55 PM
  • Hmm... my Nokia 1520 doesn't show the same problem. The Maps app and your app show exactly the same thing, and it's correct for my location.  Where are you located? 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, January 22, 2015 3:09 PM
    Moderator
  • THis is weird. I'm in Shanghai, China. I'm waiting for Demin update, maybe that can fix it.

    I wonder why cortana or HERE Map, or even MSN Health GPS tracking give the correct location on my phone, don't they use the same Windows.Devices.Geolocation api?

    Thursday, January 22, 2015 10:57 PM