Hello and Thanks for the help.
Is it possible to populate 10 mapview locations from a .plist file using a for loop ? If so how ?
my current code for my mapview is all hard coded. I would like to improve upon this by pulling - Longitude, Latitude, Title, SubTitle - from a for loop if possible. Thank You.
////
.....
MKCoordinateRegion region3 = {{0.0,0.0}, {0.0,0.0}};
region3.center.latitude = 33.45869;
region3.center.longitude = -84.66931;
region3.span.longitudeDelta = 0.01f;
region3.span.latitudeDelta=0.01f;
// [mapview setRegion:region4 animated:YES];
BandsMap *ann3 = [[BandsMap alloc]init];
ann3.title = @"Indigo Bar & Lounge";
ann3.subtitle = @"Let the good times roll";
ann3.coordinate = region3.center;//
////
annoArray = [[NSArray alloc] initWithObjects:ann1,ann2,ann3.....,nil];
[mapView addAnnotations:annoArray];.......
Something like this I suppose but not quite sure how to finish
for(NSDictionary *key in mapDataPlist)
{
NSString *c = [key objectForKey:@"Title"];
NSString *a = [key objectForKey:@"SubTitle"];
NSString *lat = [key objectForKey:@"Latitude"];
NSString *lon = [key objectForKey:@"Longitude"];
CGFloat strFLat = (CGFloat)[lat floatValue];
CGFloat strFLon = (CGFloat)[lon floatValue];
//////
?????
}