I am trying to plot a MKPolygon on a MKMapView in iOS 4.0. I have an NSArray which contains custom objects that include properties for latitude/longitude. I have a code samp
coordinatesArray; //Your array containing the coordinates
for (int i=0; i <[coordinatesArray count]; i++)
{
float latitude = [coordinatesArray[i][@"latitude"] floatValue];
float longitude = [coordinatesArray[i][@"longitude"] floatValue];
MKPolygon *polygon;
CLLocationCoordinate2D coordinates[[coordinatesArray count]];
coordinates[i] = CLLocationCoordinate2DMake(latitude , longitude);
polygon = [MKPolygon polygonWithCoordinates:coordinates count:[coordinatesArray count]];
[self.mapView addOverlay:polygon];
}
//Your "coordinatesArray" is an array containing the dictionary with multiple values of latitude and longitude keys. //Hope this helps you.