/// <summary>
        /// Called when we receive new location data.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private void ResolveLocationChange(object sender, CLLocationsUpdatedEventArgs e)
        {
            var len = e.Locations.Length;

            if (len > 0)
            {
                lastKnownLocation = new IosLocation(e.Locations[len - 1]);
                Log.D(this, "New " + lastKnownLocation);
            }
        }
 public bool AttemptSetLocation(Scalar altitude)
 {
     if (altitude.unit.quantity != Quantity.Length)
     {
         return(false);
     }
     else
     {
         lastKnownLocation = new IosLocation(altitude.ConvertTo(Units.Length.METER).amount);
         return(true);
     }
 }
        // Overridden from ILocationManager
        public bool StartAutomaticLocationPolling()
        {
            Log.D(this, "Starting location polling");
            if (CLLocationManager.LocationServicesEnabled)
            {
                native.DesiredAccuracy = 100;// Desired accuracy in meters.
            }

            native.LocationsUpdated += ResolveLocationChange;
            native.StartMonitoringSignificantLocationChanges();
            isPolling = true;
            if (native.Location != null)
            {
                lastKnownLocation = new IosLocation(native.Location);
            }
            else
            {
                lastKnownLocation = new IosLocation();
            }

            return(true);
        }
 public IosLocationManager(IosION ion)
 {
     this.ion          = ion;
     lastKnownLocation = new IosLocation();
 }
 public void setLocationRemote(double remoteAltitude)
 {
     lastKnownLocation = new IosLocation(remoteAltitude);
 }