1

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?

Gabriele Petronella
  • 106,943
  • 21
  • 217
  • 235
codercat
  • 22,873
  • 9
  • 61
  • 85
  • Yes, see http://stackoverflow.com/questions/19014926/detecting-a-point-in-a-mkpolygon-broke-with-ios7-cgpathcontainspoint. –  Nov 22 '13 at 15:21

0 Answers0