title: Zooming MKMapView to fit annotation pins?
body: <p>I am using MKMapView and have added a number of annotation pins to the map about a 5-10 kilometre area. When I run the application my map starts zoomed out to show the whole world, what is the best way to zoom the map so the pins fit the view?</p>
  
  <p><strong>EDIT:</strong>
  My initial thinking would be to use MKCoordinateRegionMake and calculate the coordinate centre, longitudeDelta and latitudeDelta from my annotations. I am pretty sure this will work, but I just wanted to check I was not missing anything obvious.</p>
  
  <p>Code added, BTW: FGLocation is an class that conforms to <code>MKAnnotation</code>, locationFake is an <code>NSMutableArray</code> of these objects. Comments are always welcome ....</p>
  
  <pre><code>- (MKCoordinateRegion)regionFromLocations {
      CLLocationCoordinate2D upper = [[locationFake objectAtIndex:0] coordinate];
      CLLocationCoordinate2D lower = [[locationFake objectAtIndex:0] coordinate];
  
      // FIND LIMITS
      for(FGLocation *eachLocation in locationFake) {
          if([eachLocation coordinate].latitude &gt; upper.latitude) upper.latitude = [eachLocation coordinate].latitude;
          if([eachLocation coordinate].latitude &lt; lower.latitude) lower.latitude = [eachLocation coordinate].latitude;
          if([eachLocation coordinate].longitude &gt; upper.longitude) upper.longitude = [eachLocation coordinate].longitude;
          if([eachLocation coordinate].longitude &lt; lower.longitude) lower.longitude = [eachLocation coordinate].longitude;
      }
  
      // FIND REGION
      MKCoordinateSpan locationSpan;
      locationSpan.latitudeDelta = upper.latitude - lower.latitude;
      locationSpan.longitudeDelta = upper.longitude - lower.longitude;
      CLLocationCoordinate2D locationCenter;
      locationCenter.latitude = (upper.latitude + lower.latitude) / 2;
      locationCenter.longitude = (upper.longitude + lower.longitude) / 2;
  
      MKCoordinateRegion region = MKCoordinateRegionMake(locationCenter, locationSpan);
      return region;
  }
  </code></pre>