title: Load only five annotations to MKMapVIew
body: <p>I have a MKMapView, and I would like to know how I can find the nearest 5 annotations to the user, and only display them on the MKMapView.</p>
  
  <p>My code currently is:</p>
  
  <pre><code>- (void)loadFiveAnnotations {
      NSString *string = [[NSString alloc] initWithContentsOfURL:url];
      string = [string stringByReplacingOccurrencesOfString:@"\n" withString:@""];
      NSArray *chunks = [string componentsSeparatedByString:@";"];
      NSArray *keys = [NSArray arrayWithObjects:@"type", @"name", @"street", @"address1", @"address2", @"town", @"county", @"postcode", @"number", @"coffeeclub", @"latlong", nil];   
      // max should be a multiple of 12 (number of elements in keys array)
      NSUInteger max = [chunks count] - ([chunks count] % [keys count]);
      NSUInteger i = 0;
  
      while (i &lt; max)
      {
          NSArray *subarray = [chunks subarrayWithRange:NSMakeRange(i, [keys count])];
          NSDictionary *dict = [[NSDictionary alloc] initWithObjects:subarray forKeys:keys];
          // do something with dict
          NSArray *latlong = [[dict objectForKey:@"latlong"] componentsSeparatedByString:@","];
          NSString *latitude = [[latlong objectAtIndex:0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
          NSString *longitude = [[latlong objectAtIndex:1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
          CLLocationDegrees lat = [latitude floatValue];
          CLLocationDegrees longi = [longitude floatValue];
          Annotation *annotation = [[Annotation alloc] initWithCoordinate:CLLocationCoordinate2DMake(lat, longi)];
          annotation.title = [dict objectForKey:@"name"];
          annotation.subtitle = [NSString stringWithFormat:@"%@, %@, %@",[dict objectForKey:@"street"],[dict objectForKey:@"county"], [dict objectForKey:@"postcode"]];
          [mapView addAnnotation:annotation];
          [dict release];
  
          i += [keys count];
      }
  }
  </code></pre>