2013-11-15 39 views
0

我使用GeoLocator类作为位置感知应用程序,我希望位置每分钟更新一次以节省电量。我相应地设置了ReportInverval属性,但PositionChanged事件更频繁地触发。这里有什么问题?GeoLocator PositionChanged事件经常被触发

App.Geolocator = new Geolocator(); 
App.Geolocator.DesiredAccuracy = PositionAccuracy.High; 
App.Geolocator.MovementThreshold = 100; 
App.Geolocator.ReportInterval = 1000*60; //report change every minute 
App.Geolocator.PositionChanged += geolocator_PositionChanged; 

回答

1

这应该给你一个位置,但这位文档中并说:

如果另一个应用程序已要求更频繁的更新,通过指定ReportInterval较小的值,您的应用程序可以在更高的接收更新频率超过要求

0

发现它为什么不工作。解决方案是不使用MovementTreshold,因为它优先于ReportInterval。

相关问题