//This will keep going in the background and the foreground
		public void PrintLocation (object sender, LocationUpdatedEventArgs e) 
		{
			CLLocation location = e.Location;

			Console.WriteLine ("Altitude: " + location.Altitude + " meters");
			Console.WriteLine ("Longitude: " + location.Coordinate.Longitude);
			Console.WriteLine ("Latitude: " + location.Coordinate.Latitude);
			Console.WriteLine ("Course: " + location.Course);
			Console.WriteLine ("Speed: " + location.Speed);
		}
Пример #2
0
        //This will keep going in the background and the foreground
        public void PrintLocation(object sender, LocationUpdatedEventArgs e)
        {
            CLLocation location = e.Location;

            Console.WriteLine("Altitude: " + location.Altitude + " meters");
            Console.WriteLine("Longitude: " + location.Coordinate.Longitude);
            Console.WriteLine("Latitude: " + location.Coordinate.Latitude);
            Console.WriteLine("Course: " + location.Course);
            Console.WriteLine("Speed: " + location.Speed);
        }
        public void HandleLocationChanged (object sender, LocationUpdatedEventArgs e)
        {
            // handle foreground updates
            CLLocation location = e.Location;

            LblAltitude.Text = location.Altitude + " meters";
            LblLongitude.Text = location.Coordinate.Longitude.ToString ();
            LblLatitude.Text = location.Coordinate.Latitude.ToString ();
            LblCourse.Text = location.Course.ToString ();
            LblSpeed.Text = location.Speed.ToString ();

            Console.WriteLine ("UI updated");
        }
        public void HandleLocationChanged(object sender, LocationUpdatedEventArgs e)
        {
            // handle foreground updates
            CLLocation location = e.Location;

            LblAltitude.Text  = location.Altitude + " meters";
            LblLongitude.Text = location.Coordinate.Longitude.ToString();
            LblLatitude.Text  = location.Coordinate.Latitude.ToString();
            LblCourse.Text    = location.Course.ToString();
            LblSpeed.Text     = location.Speed.ToString();

            Console.WriteLine("UI updated");
        }