【发布时间】:2021-07-02 23:12:34
【问题描述】:
我使用 Windows-Geolocator 中的 PositionChanged-Event 在地图上显示用户当前位置。一切正常,但大约 15 分钟后,地理定位器只返回相当旧的位置(30 秒到一分钟):
这是我的日志文件中的一个 sn-p:
2021-04-06 18:07:23,787 信息 [127:WindowsGnssPositionProvider:LocatorOnPositionChanged()]-> LocatorOnPositionChanged vom Geolocator: Long: xxxx, Lat: xxxx,精度:4,时间戳:06.04.2021 18:06:22 +02:00, 来源:卫星
距离越远,时间越久。
这是我的地理定位器实例:
geolocator = new Geolocator()
{
DesiredAccuracy = PositionAccuracy.High,
ReportInterval = 1000
};
geolocator.PositionChanged += Geolocator_PositionChanged;
有没有办法解决这个问题或从地理定位器中清除缓存?
【问题讨论】:
标签: c# wpf windows geolocation