Example #1
0
        /// <summary>
        /// Subscribe to the events of the active map view
        /// </summary>
        /// <returns></returns>
        protected override bool Initialize()
        {
            bool initResult = base.Initialize();

            // start subscribing to the events when the map view changes
            _activeMapViewChangeEventToken = ActiveMapViewChangedEvents.Subscribe(OnActiveMapViewChangeEvents);

            return(initResult);
        }
Example #2
0
        public CameraPaneViewModel()
        {
            _zoomToCmd = new RelayCommand(() => ZoomTo(), () => CanZoomToCamera());
            _panToCmd  = new RelayCommand(() => PanTo(), () => CanPanToCamera());

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

            InitializeAsync();
        }
Example #3
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();
 }