如何添加独立的动作来映射叠加层?以我的代码为例:我不确定是否应该使用循环或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
}
}
答案 0 :(得分:0)
只需拖动[self uploadSmall];低于[self updateLocations];