Когда я загружаю 500 аннотаций на карту, приложение перемещается при перемещении карты, есть ли способ решить эту проблему?Хорошо, когда карта масштабирована и отображает 50 аннотаций, но когда масштаб уменьшен для отображения всех аннотаций, приложение работает медленно и отстает при перемещении по карте.
Текущий код:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
self.annotations = [[NSMutableArray alloc] init];
// Create location manager object
locationManager = [[CLLocationManager alloc] init];
// All results from the location manager
[locationManager setDistanceFilter:kCLDistanceFilterNone];
// Set accuracy
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
// Start updating current location
[mapView setShowsUserLocation:YES];
self.mapView.mapType = MKMapTypeStandard; // also MKMapTypeSatellite or MKMapTypeHybrid
// Start off by default in some city
MKCoordinateRegion newRegion;
newRegion.center.latitude = value1;
newRegion.center.longitude = value2;
newRegion.span.latitudeDelta = value3;
newRegion.span.longitudeDelta = value4;
[self.mapView setRegion:newRegion animated:YES];
[self.mapView addAnnotations:self.annotations]; // --> self.annotations is array with 500 annotations
}