当我点击注释图标时,我得到这个粉红色区域和多边形,?放大和缩小时不会显示。我在模拟器和设备上都遇到了这个问题。
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id <MKOverlay>)overlay{
MKPolygonRenderer *rendr = [[MKPolygonRenderer alloc]initWithOverlay:overlay];
rendr.lineWidth = 5.0;
rendr.strokeColor = polygonColor;
rendr.fillColor=[UIColor clearColor];
if(polygonColor.CGColor == [UIColor greenColor].CGColor || polygonColor.CGColor == [UIColor blueColor].CGColor){
}
else if([[rendr polygon] pointCount] == 3 )
rendr.strokeColor = [UIColor redColor];
else if([[rendr polygon] pointCount] == 4)
rendr.strokeColor = [UIColor purpleColor];
else if([[rendr polygon] pointCount] == 5)
rendr.strokeColor = [UIColor orangeColor];
else
rendr.strokeColor = [UIColor magentaColor];
return rendr;
}