So I am using the map to add points for each person that has an address in the contacts, and I am having a bit of a hard time figuring out how to set it up for the unknown number of contacts. right now the way I have it set up, it is only adding a pin for the last contact in the list. here is some code: address is a string that is set from addressProperty.
if(addressProperty != nil)
{
[location geocodeAddressString:address completionHandler:^(NSArray *placemarks, NSError *error) {
NSMutableArray *array = [[NSMutableArray alloc]init];
for(int a = 0; a < [placemarks count]; a++)
{
self.placeMarkData = [placemarks objectAtIndex:a];
[point setCoordinate: self.placeMarkData.location.coordinate];
[array addObject:point];
pin.animatesDrop = YES;
point.title = address;
[map addAnnotations:array];
}
}];
}
So when I run the app I can see the pin being set in each location and moving to the next location until it ends on the last locations in the list. How can I add a point for each? I am sure it is an easy solution, but it is eluding me right now.