如何添加独立操作来映射叠加层?例如,请参阅我的代码:我不确定是否应该使用循环或 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
}
}