Пример #1
0
        private async void StopTrack_Click(object sender, RoutedEventArgs e)
        {
            MessageDialog messageDialog = new MessageDialog("停止tracking");
            await messageDialog.ShowAsync();

            trackingGeolocator.Stop();
            trackingGeolocator.PositionChanged -= aMapGeolocator_PositionChanged;
        }
 private void OnMapUnloaded(object sender, RoutedEventArgs e)
 {
     if (geolocator != null)
     {
         geolocator.PositionChanged -= OnPositionChanged;
         geolocator.Stop();
     }
 }