2012-09-25 37 views
0

如何添加獨立操作來映射疊加?例如,看我的代碼:我不確定是否應該使用循環或if語句。如果我使用If語句應該如何?預先感謝您..獨立操作來映射疊加-xcode

- (void)configureOverlay { 
if (self.location) { 
    [self.mapView removeAnnotations:[self.mapView annotations]];   
    [self.mapView removeOverlays:[self.mapView overlays]]; 

    radiusSmall = 100; 

     circleOverlaySmall *overlaysmall = [[circleOverlaySmall alloc] initWithCoordinate:self.location.coordinate radius:radiusSmall]; 
    [self.mapView addOverlay:overlaysmall]; 
    [self updateSmall]; <--this action called 

      CircleOverlay *overlay = [[CircleOverlay alloc] initWithCoordinate:self.location.coordinate radius:self.radius]; 
    [self.mapView addOverlay:overlay]; 

    GeoQueryAnnotation *annotation = [[GeoQueryAnnotation alloc] initWithCoordinate:self.location.coordinate radius:self.radius]; 
    [self.mapView addAnnotation:annotation]; 

    [self updateLocations]; <--this action called 

} 
} 
+0

你想要執行什麼操作?你已經使用if語句已經在地圖上的條件,更新位置和更新小,你可以使用IF類似..請指定你想更清楚地執行的行動,以更好的答案.. – iMeMyself

回答

0

只是拖動[self uploadSmall];在[self updateLocations]下面;