Note that there are some explanatory texts on larger screens.

plurals
  1. POMKMapAnnotations didSelectAnnotationView not responding
    primarykey
    data
    text
    <p>I am creating an app that pulls data from a server and pinpoints the different houses on a map. My problem is that it does display the annotations but when I click on them they do not respond - (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view</p> <p>I put my annotations in an array by:</p> <pre><code>int s; self.mapAnnotations = [[NSMutableArray alloc] init]; for(s=0; s &lt; numberOfAnnotations; s++) { //NSDictionary *dict2 = [parser objectWithString:[[arrayOfResults objectAtIndex:0] description]]; CLLocationDegrees daLong = [[[[[arrayOfResults objectAtIndex:s] objectForKey:@"map"] objectForKey:@"longitude"] description] floatValue]; CLLocationDegrees daLat = [[[[[arrayOfResults objectAtIndex:s] objectForKey:@"map"] objectForKey:@"latitude"] description] floatValue]; /*self.customAnnotation = [[BasicMapAnnotation alloc] initWithLatitude:daLat andLongitude:daLong]; [self.mapView addAnnotation:self.customAnnotation];*/ BasicMapAnnotation *m = [[BasicMapAnnotation alloc] initWithLatitude:daLat andLongitude:daLong]; [self.mapAnnotations addObject:m]; } [self.mapView addAnnotations:self.mapAnnotations]; NSLog(@"this number of annotations %d", [self.mapAnnotations count]); </code></pre> <p>I also noticed when I created a separate house to place on the map in my viewDidLoad:</p> <pre><code>self.normalAnnotation = [[BasicMapAnnotation alloc] initWithLatitude:38 andLongitude:-90.2045]; self.normalAnnotation.title = @" "; [self.mapView addAnnotation:self.normalAnnotation]; </code></pre> <p>It did work when I clicked on it, but the ones passed through the array didn't work. Can anyone help me figure out why it's not responding?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload