I'm filtering some Google Places data and then displaying each location on a map view. currently I have all the points displaying on the map. I need to figure out how to show a annotationPoint.title = place.name; for each of these locations.
Any idea how I'd go about doing this for the entire array of location places?
thanks so much for any help!
//UPDATE - to handle filtering
- (void)googlePlacesConnection:(GooglePlacesConnection *)conn didFinishLoadingWithGooglePlacesObjects:(NSMutableArray *)objects
{
if ([objects count] == 0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No matches found near this location"
message:@"Try another place name or address"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
} else {
locations = objects;
//UPDATED locationFilterResults for filtering later on
locationsFilterResults = objects;
[tableView reloadData];
[mapView removeAnnotations:mapView.annotations];
[mapView addAnnotations:objects];
}
}