自分の位置の青い点を除いて、マップビューからすべての注釈を削除したいと思います。私が電話するとき:
[mapView removeAnnotations:mapView.annotations];
すべての注釈が削除されます。
注釈が青い点の注釈でない場合、(すべての注釈の for ループのように) どのように確認できますか?
編集(私はこれで解決しました):
for (int i =0; i < [mapView.annotations count]; i++) {
if ([[mapView.annotations objectAtIndex:i] isKindOfClass:[MyAnnotationClass class]]) {
[mapView removeAnnotation:[mapView.annotations objectAtIndex:i]];
}
}