예제 #1
0
        private void GeoMap_SeriesMouseLeftButtonUp(object sender, DataChartMouseButtonEventArgs e)
        {
            _selectedEarthQuake    = e.Item as EarthQuakeViewModel;
            _vm.SelectedEarthQuake = null;

            ShowUpDetailsContorol();
        }
예제 #2
0
        /// <summary>
        /// Moves the map to earthquake location with animation.
        /// </summary>
        /// <param name="location">The location.</param>
        private void MoveMapToLocation(EarthQuakeViewModel location)
        {
            _vm.SelectedEarthQuake = null;
            //TODO:
            // _currentElement = xamMap.Layers["symbolLayer"].Elements.FirstOrDefault(x => x.ToolTip == location);

            //Rect currentWindowRect = xamMap.WindowRect;
            //_nextWindowRect = GetRecForLatitudeLongitude(location.Longitude - 4,
            //                                                location.Latitude + 4,
            //                                                location.Longitude + 4,
            //                                                location.Latitude - 4);

            //currentWindowRect.Union(_nextWindowRect);
            //xamMap.WindowRect = currentWindowRect;
            //// Timer for zoom OUT animation
            //DispatcherTimer timer = new DispatcherTimer { Interval = _mapAnimationDiration };
            //// Timer for zoom IN animation
            //DispatcherTimer timer2 = new DispatcherTimer { Interval = _mapAnimationDiration };
            //timer.Tick += (o, e) =>
            //{
            //    xamMap.WindowRect = _nextWindowRect;
            //    timer.Stop();
            //    timer2.Tick += (o2, e2) =>
            //    {
            //        timer2.Stop();
            //        // After zoom IN animation ends show the Details Control
            //        ShowUpDetailsContorol();
            //    };
            //    timer2.Start();
            //};
            //timer.Start();
        }