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,455
  • 2
  • 32
  • 51

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,824
  • 17
  • 99
  • 186
Nitin
  • 7,455
  • 2
  • 32
  • 51
0

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

iOS
  • 3,526
  • 3
  • 37
  • 82