protected override void SendLocation (MvxGeoLocation location) { // note - no need to lock here - just check then go if (_locationManager == null) return; base.SendLocation (location); }
private static MvxGeoLocation CreateLocation(CLLocation location) { var position = new MvxGeoLocation { Timestamp = location.Timestamp.ToDateTimeUtc() }; var coords = position.Coordinates; #warning should some of these coords fields be nullable? coords.Altitude = location.Altitude; coords.Latitude = location.Coordinate.Latitude; coords.Longitude = location.Coordinate.Longitude; coords.Speed = location.Speed; coords.Accuracy = location.HorizontalAccuracy; coords.AltitudeAccuracy = location.VerticalAccuracy; return position; }
private static MvxGeoLocation CreateLocation(GeoCoordinate coordinate, DateTimeOffset timestamp) { var position = new MvxGeoLocation {Timestamp = timestamp}; var coords = position.Coordinates; coords.Altitude = coordinate.Altitude; coords.Latitude = coordinate.Latitude; coords.Longitude = coordinate.Longitude; coords.Speed = coordinate.Speed; coords.Accuracy = coordinate.HorizontalAccuracy; coords.AltitudeAccuracy = coordinate.VerticalAccuracy; return position; }
protected virtual void SendLocation(MvxGeoLocation location) { var callback = _locationCallback; if (callback != null) callback(location); }