MapKit seems to have a strange issue!!!
I have some code that adds some annotations and then I call
NSArray *existingpoints = mapView.annotations;
[mapView removeAnnotations:existingpoints];
if ([mapView.annotations count] > 0) {
for(Plane *annotation in mapView.annotations){
NSLog(@"Name: %@",annotation.reg);
[mapView removeAnnotation:annotation];
}
NSLog(@"\nMapCount:%i after attempting manual remove",[mapView.annotations count]);
}
Now the strange bit is that from time to time I can get inside the mapView.annotations count being greater than 0. So therefore I have extra "protection" and try and manually remove the item than gets NSLogged out.
However the the final count is still 1 after all that!
Most strange!