Path property of MKOverlayPathView
instance from MKMapView
always returns nil during all iOS7.0
betas (from 1 til 5).
Trying to replace MKOverlayPathView
with new renderers API (MKOverlayPathRenderer
) has no effect.
- (MKOverlayView *) mapView:(MKMapView *)mapView viewForOverlay:(id <MKOverlay>)overlay {
MKPolygonView *polygonView = [[[MKPolygonView alloc] initWithPolygon:overlay] autorelease]; // overlay — MKPolygon class
CGPathRef p = polygonView.path; // not nil
return [polygonView autorelease];
}
// ... somewhere in main thread
MKPolygonView *polygonOverlayView = (MKPolygonView*)[_mapView viewForOverlay:overlay]; // polygonOverlayView not nil
CGPathRef p = polygonOverlayView.path; // nil
Does anyone have this kind of problem?