I want to update the images of some of my annotations on a mapview every 5 seconds, however I dont\' want to remove and re-add them to the map as this causes them to \'flash\' o
It seems you are using your own custom views for the annotations, in that case you can simply add a "refresh" method to your custom view and call it after you have updated the underlying annotation (ie: a custom view -a derived class from MKAnnotationView- is always attached to a potentially custom "annotation" class that conforms to the MKAnnotation protocol)
*) CustomAnnotationView.h
@interface CustomAnnotationView : MKAnnotationView
{
...
}
...
//tell the view to re-read the annotation data it is attached to
- (void)refresh;
*) CustomAnnotationView.m
//override super class method
- (void)setAnnotation:(id )annotation
{
[super setAnnotation:annotation];
...
[self refresh];
}
- (void)refresh
{
...
[self setNeedsDisplay]; //if necessary
}
*) Where you handle the MKMapView and its annotations
for(CustomAnnotation *annotation in [m_MapView annotations])
{
CustomAnnotationView *annotationView = [m_MapView viewForAnnotation:annotation];
[annotationView refresh];
}