Example #1
0
 /// <summary>
 /// Updates the variable tracking last location.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 public void UpdateLastLocation(object sender, LocationUpdatedEventArgs e)
 {
     // update last location
     _lastLocation.Latitude        = e.Location.Coordinate.Latitude;
     _lastLocation.Longitude       = e.Location.Coordinate.Longitude;
     _lastLocation.TimeLastUpdated = DateTime.Now;
     _lastLocation.LocationUpdated = true;
 }
Example #2
0
        public void OnLocationChanged(object sender, LocationUpdatedEventArgs e)
        {
            // Handle foreground updates
            CLLocation location = e.Location;

            //LblAltitude.Text = location.Altitude + " meters";
            LatLabel.Text = location.Coordinate.Latitude.ToString();
            LonLabel.Text = location.Coordinate.Longitude.ToString();

            LastSentLabel.Text = Manager.GetLastLocationString();
            //LblCourse.Text = location.Course.ToString();
            //LblSpeed.Text = location.Speed.ToString();

            //Console.WriteLine("foreground updated");
        }