MKOverlayPathView gets "fuzzy" on high zoom factor
I'm developing an application that uses an MKOverlayPathView to highlight certain positions on an MKMapView. Basically the idea is that the overlay path view gets passed a list of CLLocationCoordinate2D structs, then connects them linearly using CGPathAddLineToPoint()
in its custom drawRect:
implementation.
However,开发者_如何转开发 in both the Simulator and on a device (iPhone 3GS running 4.2.1), I notice some strange behavior: the path behaves perfectly well up to a certain zoom level, then will begin to "fuzz" (for lack of a better term) in certain segments. These problem areas are always sharply delineated, and the rest of the path will be just fine:
I've tried calling setNeedsLayout
and invalidatePath
on the path view (from the MKMapView's regionDidChangeAnimated
notification method), but both of those will just cause the fuzzed area to disappear, rather than be redrawn properly. Is there a fix for this?
精彩评论