Hi am using this method to get the coordinates and add a pin to the map view for one post code
-(void)myMapview
{
//sitePC is an Array with the Post code location
NSString *addressString = [self.sitePC valueForKey:@"sitePC"];
CLGeocoder *geocoder = [[CLGeocoder alloc] init];
[geocoder geocodeAddressString:addressString completionHandler:^(NSArray *placemarks, NSError *anError)
{ for(CLPlacemark *placemark in placemarks) {
NSLog(@"Placemark: %@",placemark);
MKPointAnnotation *pa = [[MKPointAnnotation alloc] init];
pa.coordinate = placemark.location.coordinate;
pa.title = [self.sitePC valueForKey:@"siteName"];
[self.mapview addAnnotation:pa];
} if(anError)
{ NSLog(@"Error: %@",[anError description]); }
}];
}
but now the sitePC array hold 10 post codes to process, I read the Documents for CLGeocoder and I know I can only send one request at the time.
my question is how do I send only one request at the time , for each postcode ?