I have a mapview where the annotation\'s coordinates are constantly being updated but when I use setCoordinate, the annotation does not move. How do I refresh the annotation
Removing all existing annotations, and re-adding the new or updated annotation list will refresh the mapView. Firstly I tried:
mapView.annotations.removeAll()
but received the error:
"Value of type '(MKMapRect) -> Set' has no member 'removeAll'"
However this worked:
for annotation in mapView.annotations{
mapView.removeAnnotation(annotation)
}
// .. code to add the new or updated annotation list