Cirrious.MvvmCross.Plugins.Location.Touch.MvxTouchLocationWatcher.LocationDelegate.LocationsUpdated C# (CSharp) Method

LocationsUpdated() public method

public LocationsUpdated ( CLLocationManager manager, CLLocation locations ) : void
manager CLLocationManager
locations CLLocation
return void
            public override void LocationsUpdated(CLLocationManager manager, CLLocation[] locations)
            {
                // see https://github.com/slodge/MvvmCross/issues/92 and http://stackoverflow.com/questions/13262385/monotouch-cllocationmanagerdelegate-updatedlocation
                if (locations.Length == 0)
                {
                    MvxTrace.Error("iOS has passed LocationsUpdated an empty array - this should never happen");
                    return;
                }

                var mostRecent = locations[locations.Length - 1];
                var converted = CreateLocation(mostRecent, _lastSeenHeading);
                _owner.SendLocation(converted);
            }