Hi all,
I had a problem with when removing and adding annotations to the MapView. I need to refresh the Annotations every 10 seconds. But it is taking too long time when removing and adding the Annotations. Is there any other methods to do it fast. The following code I am using for remove and adding annotations.Please suggest any ideas it is very urgent.
for (int k=0; k<[pOIsList count]; k++)
{
POI* poi=[pOIsList objectAtIndex:k];
[mainMapView removeAnnotation:poi];
}
for(int i = 0;i < [parkingObjList count];i++)
{
ParkableDTO* areaObject = [parkingObjList objectAtIndex:i];
CLLocationCoordinate2D coords2;
coords2.latitude = areaObject.latitudeValue;
coords2.longitude = areaObject.longitudeValue;
POI *poi = [[POI alloc] initWithCoords:coords2 aParkingArea:areaObject];
[mainMapView addAnnotation:poi];
[pOIsList addObject:poi];
[poi release];
}
Thanks in Advance. Sekhar.