映射叠加的独立操作-xcode

时间:2012-09-25 11:50:57

标签: ios xcode map action overlay

如何添加独立的动作来映射叠加层?以我的代码为例:我不确定是否应该使用循环或if语句。如果我使用If语句它应该如何?提前谢谢你..

- (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

}
}

1 个答案:

答案 0 :(得分:0)

只需拖动[self uploadSmall];低于[self updateLocations];