VRR
VRR

Reputation: 1

Obj-C MkMapView Polygon Overlay color is weird and blurring the mapView / glitching

I'm getting this pink area along with polygon when i click on annotation icon, ? it doesn't show while zoom-in and zoom-out. I'm getting this issue in both Simulator and also on device.

enter image description here

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

}

Upvotes: 0

Views: 92

Answers (0)

Related Questions