0.5メートルごとにGeoCoordinateWatcherPositionChangedイベントを発生させる以下のコードがあります。それより少ない場合がありますが、それが私の要件です。
問題は、電話で歩いているときに、コードが0.5メートルごとにイベントを発生させるのではなく、0.5メートル後にランダムにイベントを発生させることです。また、速く移動すると、すぐにいくつかのイベントが発生することがあります。
誰かが0.5メートルごとに正確に位置変更イベントを発生させる方法を教えてもらえますか?
watcher = new GeoCoordinateWatcher(GeoPositionAccuracy.Default);
if (watcher.Permission == GeoPositionPermission.Granted)
{
watcher.MovementThreshold = 0.5;//in meters
}
watcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(watcher_PositionChanged); // PositionChanged events occur whenever your position changes
watcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(watcher_OnStatusChanged);
watcher.Start();