コード例 #1
0
		public void LocationsUpdated (CLLocationManager manager, CLLocation[] locations)
		{
			CLLocation lastLocation = locations == null ? null : locations.LastOrDefault ();
			if (lastLocation == null)
				return;

			// Do not zoom to the user's location if there is already a target region.
			if (TargetRegion != null)
				return;

			var newRegion = new MKCoordinateRegion (lastLocation.Coordinate, InitialZoomSpan);
			MapView.SetRegion (newRegion, true);
		}