当我测试使用Geolocator.GetGeopositionAsync获取当前用户位置的应用程序时,返回的坐标始终距离实际位置几百米,即使返回的PositionSource来自GPS,其精度在10米。
我使用Lumia 930作为测试工具。 以下是我的代码:
//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);
有人知道为什么会这样吗?