double latitudeRangeForLocation(CLLocation location) { const double M = 6367000.0; // approximate average meridional radius of curvature of earth const double metersToLatitude = 1.0 / ((Math.PI / 180.0) * M); const double accuracyToWindowScale = 2.0; return location.HorizontalAccuracy * metersToLatitude * accuracyToWindowScale; }
public virtual void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation) { throw new You_Should_Not_Call_base_In_This_Method (); }
public virtual System.Double DistanceFrom (CLLocation location) { if (location == null) throw new ArgumentNullException ("location"); if (IsDirectBinding) { return MonoMac.ObjCRuntime.Messaging.Double_objc_msgSend_IntPtr (this.Handle, selDistanceFromLocation, location.Handle); } else { return MonoMac.ObjCRuntime.Messaging.Double_objc_msgSendSuper_IntPtr (this.SuperHandle, selDistanceFromLocation, location.Handle); } }
double longitudeRangeForLocation(CLLocation location) { double latitudeRange = latitudeRangeForLocation(location); return latitudeRange * Math.Cos (location.Coordinate.Latitude * Math.PI / 180); }
public CLLocationUpdatedEventArgs (CLLocation newLocation, CLLocation oldLocation) { this.NewLocation = newLocation; this.OldLocation = oldLocation; }
public override Void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation) { if (updatedLocation != null) updatedLocation (manager, new CLLocationUpdatedEventArgs (newLocation, oldLocation)); }