//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); }
//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); }
//This will keep going in the background and the foreground public void PrintLocation(object sender, LocationUpdatedEventArgs e) { var location = e.Location; Console.WriteLine("Altitude: " + location.Altitude + " meters"); Console.WriteLine("Longitude: " + location.Longitude); Console.WriteLine("Latitude: " + location.Latitude); Console.WriteLine("Course: " + location.Course); Console.WriteLine("Speed: " + location.Speed); //Database.SaveItem(deviceLocation); }
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("foreground 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 ("foreground 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(); Mapa.ShowsUserLocation = true; //mapa Mapa.AddAnnotation(new MKPointAnnotation() { Title = "Anotacion", Coordinate = new CLLocationCoordinate2D(Manager.latitude, Manager.longitude) }); Console.WriteLine("foreground updated"); Console.WriteLine("initial loc:" + Mapa.UserLocation.Coordinate.Latitude + "," + Mapa.UserLocation.Coordinate.Longitude); }