Exemplo n.º 1
0
		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;
		}
Exemplo n.º 2
0
		public virtual void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation)
		{
			throw new You_Should_Not_Call_base_In_This_Method ();
		}
Exemplo n.º 3
0
		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);
			}
		}
Exemplo n.º 4
0
		double longitudeRangeForLocation(CLLocation location)
		{
			double latitudeRange = latitudeRangeForLocation(location);
			return latitudeRange * Math.Cos (location.Coordinate.Latitude * Math.PI / 180);
		}
Exemplo n.º 5
0
		public CLLocationUpdatedEventArgs (CLLocation newLocation, CLLocation oldLocation)
		{
			this.NewLocation = newLocation;
			this.OldLocation = oldLocation;
		}
Exemplo n.º 6
0
			public override Void UpdatedLocation (CLLocationManager manager, CLLocation newLocation, CLLocation oldLocation)
			{
				if (updatedLocation != null)
					updatedLocation (manager, new CLLocationUpdatedEventArgs (newLocation, oldLocation));
			}