Beispiel #1
0
        public CameraPaneViewModel()
        {
            _zoomToCmd = new RelayCommand(() => ZoomTo(), () => CanZoomToCamera());
            _panToCmd  = new RelayCommand(() => PanTo(), () => CanPanToCamera());

            CameraChangedEvents.Subscribe(OnCameraChanged);
            ActiveMapViewChangedEvents.Subscribe(OnActiveMapViewChanged);

            InitializeAsync();
        }
Beispiel #2
0
        /// <summary>
        /// Default constructor which initializes the RelayCommands, subscribes to events and sets the initial heading.
        /// </summary>
        public CameraControlViewModel()
        {
            _zoomInCmd  = new RelayCommand(() => ZoomIn(), () => CanZoom());
            _zoomOutCmd = new RelayCommand(() => ZoomOut(), () => CanZoom());

            _pitchDownCmd = new RelayCommand(() => PitchDown(), () => CanAdjustPitch());
            _pitchUpCmd   = new RelayCommand(() => PitchUp(), () => CanAdjustPitch());

            CameraChangedEvents.Subscribe(OnCameraChanged);
            ActiveMapViewChangedEvents.Subscribe(OnActiveViewChanged);

            SetHeadingFromMapView(MappingModule.ActiveMapView);
        }
 public HeadingViewModel()
 {
     CameraChangedEvents.Subscribe(CameraChanged);
     ActiveMapViewChangedEvents.Subscribe(OnActiveViewChanged);
     InitalizeAsync();
 }