0

I am using following code and it display only one pin(annotation) on Map view. Please help me to figure out my mistake.

- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
    {
        //Here

        NSLog(@"didAddAnnotationViews");

        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:0] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:1] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:2] animated:NO];
        [self.mapView selectAnnotation:[[self.mapView annotations] objectAtIndex:3] animated:NO];

          }

Why have only one view pin annotation display?

Nitin
  • 7,375
  • 2
  • 31
  • 50

2 Answers2

0

Please visit Multiple annotation callouts in MKMapView: Multiple annotation callouts displaying in MKMapView

It appears that you will have to implement custom callouts for this behavior. Personally I like implementing subclass the MKAnnotationView to implement a custom one.

halfer
  • 19,471
  • 17
  • 87
  • 173
Nitin
  • 7,375
  • 2
  • 31
  • 50
0

Check out this sample. Even has the sample code. It may help for what you are looking for.

iOS
  • 3,370
  • 3
  • 35
  • 76