예제 #1
0
		/// <summary>
		/// Handles the position changed.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position changed event arguments.</param>
		private void OnPositionChanged(object sender, PositionEventArgs e)
		{
			if (this.engine != null && e != null && e.Position != null)
			{
				System.Threading.Tasks.Task.Run(() => this.engine.RefreshLocation(e.Position.Latitude, e.Position.Longitude, (double)(e.Position.Altitude ?? double.NaN), (double)(e.Position.Accuracy ?? double.NaN)));
			}
		}
예제 #2
0
		/// <summary>
		/// Handles the position changed event.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position changed event arguments.</param>
		private void OnHeadingChanged(object sender, PositionEventArgs e)
		{
			Position = e.Position;
			MapViewModel.Position = e.Position;

			RefreshDirections(false);
		}
예제 #3
0
		private void OnHeadingChanged (PositionEventArgs e)
		{
			var changed = HeadingChanged;

			if (changed != null)
				changed (this, e);
		}
예제 #4
0
		/// <summary>
		/// Handles the position changed event.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position changed event arguments.</param>
		private void OnPositionChanged(object sender, PositionEventArgs e)
		{
			Position = e.Position;
			MapViewModel.Position = e.Position;

			RefreshDirections(true);
		}
		/// <summary>
		/// Handles the event, when position changed.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position event args.</param>
		private void OnPositionChanged(object sender, PositionEventArgs e)
		{
			Position = e.Position;
		}
예제 #6
0
		/// <summary>
		/// Handles the position changed event.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position event arguments.</param>
		private void HandleHeadingChanged(object sender, PositionEventArgs e)
		{
			if (this.activeObject == null)
			{
				return;
			}

			Position = e.Position;

			UpdateDirection(false);
		}
예제 #7
0
		/// <summary>
		/// Handles the position changed event.
		/// </summary>
		/// <param name="sender">Sender of event.</param>
		/// <param name="e">Position changed event arguments.</param>
		private void OnPositionChanged(object sender, PositionEventArgs e)
		{
			mapViewModel.Position = e.Position;
		}
예제 #8
0
		private void OnPositionChanged(object sender, PositionEventArgs e)
		{
			// Ignore anything that might come in afterwards
			if (!IsListening)
				return;

			lock (_positionSync)
			{
				_lastPosition = e.Position;

				EventHandler<PositionEventArgs> changed = PositionChanged;

				if (changed != null)
					changed(this, e);
			}
		}