I have an overlay on the map, and I would like to change its coordinates. To make this easy, I'm going to call the setNeedsDisplayInMapRect: method after making changes to the view.
I tested this by simply changing fillColor and it works fine:
overlayView.fillColor = [[UIColor greenColor] colorWithAlphaComponent:0.3]; [overlayView setNeedsDisplayInMapRect:mapView.visibleMapRect];
However, I seem to have hit a brick wall, trying to also change the coordinates of the center of my overlay ( MKCircleView with MKCircle ). There is a method in MKAnnotation that corresponds to MKCircle called setCoordinate: - which seems to me necessary. However, unfortunately, the circle
property in MKCircleView is read-only. In addition, the overlay
property in MKOverlayView is also read-only.
Is there a way to change the coordinates for the overlay without resorting to removing the overlay and adding a new one (which will cause a very noticeable flicker on the screen.)?
source share