Hello everyone.
I would like to remove manually annotation from MKMapView.
I add two annotations using the addAnnotation: ([self.mapView addAnnotation:item.placemark];)
Then I would like to remove these annotations manually as following:
[self.mapView removeAnnotation:self.mapView.annotations[0]];
and
[self.mapView removeAnnotation:self.mapView.annotations[1]];
I do not want to remove both annotations at once using the
[self.mapView removeAnnotations:[self.mapView annotations]];
I would like to keep sometimes the annotation[0] and substitute the annotation[1] with a new one or the opposite.
Is it possible?
Regards,
kalgik
P.S: I am using the
(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation delegate function.