2013-05-28 46 views

回答

-1

你尝试的MKMapView类的这个方法:

- (void)addAnnotations:(NSArray *)annotations; 

您应该将所有MKAnnotation对象添加到一个数组中,并调用类的方法与阵列。

例子:

NSMutableArray *filterLocs=[NSMutableArray array]; 

for (MKAnnotation *loc in YourMapPointsArray) 
{ 
//add some condition here to manipulate your map points 
[filterLocs addObject:loc]; 
} 

[self.mapView addAnnotations:filterLocs]; 

或只是让普通

[self.mapView addAnnotations:YourMapPointsArray]; 
+0

是的,这很容易实现。我试图一次性显示注释的所有“标注”。 [eventMap selectAnnotation:point animated:YES]; - 所有注释。问题是苹果只允许你一次显示一个。 – user1530580

+0

我在我的地图中执行此操作,并且所有注释都在某个时间出现BTW我不想要任何动画,因此该方法对我来说很好。 – satheeshwaran

+0

你能举个例子吗?不遵守。 – user1530580

相关问题