Hi everyone, i'm having problems trying to update an annotation location with different coordinates. Is there any way I can change de location property without having to create another annotation? I've tried the code below with no luck. The annotation i'm trying to get is not updating its location. Please help!
CLLocationCoordinate2D location;
location.latitude = -36.560976;
location.longitude = -59.455807;
for (id annotation in self.mapView.annotations) {
if ([annotation isKindOfClass:[MyAnnotation class]])
{
[annotation setCoords:location]; //setCoords is defined in MyAnnotation class
}
}
Thank you all!