2010-08-23 3 views
0

J'essaie de placer des images sur Google Maps et j'ai des problèmes pour aller chercher le boundingMapRect de l'overlay. La chose étrange est que lorsque je vérifie la «superposition» avec le débogueur les données correctes sont là, mais quand j'essaie de l'imprimer - sa poubelle.Comment accéder à l'objet Overlay boundingMapRect sur OverlayView?

Ce code d'impression:

MKMapRect overlayRect = [self.overlay boundingMapRect]; 
NSLog(@"\n\n\n"); 
NSLog(@"drawMapRect: overlay: x: %f, y: %f, w: %f, h: %f", 
     MKMapRectGetMinX([overlay boundingMapRect]), 
     MKMapRectGetMinY([overlay boundingMapRect]), 
     MKMapRectGetWidth([overlay boundingMapRect]), 
     MKMapRectGetHeight([overlay boundingMapRect])); 
NSLog(@"drawMapRect: boundingMapRect x: %f, boundingMapRect y: %f, boundingMapRect w: %f, boundingMapRect h: %f", 
     [overlay boundingMapRect].origin.x, 
     [overlay boundingMapRect].origin.y, 
     [overlay boundingMapRect].size.width, 
     [overlay boundingMapRect].size.height); 
NSLog(@"drawMapRect: boundingMapRect x: %f, boundingMapRect y: %f, boundingMapRect w: %f, boundingMapRect h: %f", 
     self.overlay.boundingMapRect.origin.x, 
     ((MKOverlayView *)self).overlay.boundingMapRect.origin.y, 
     [overlay boundingMapRect].size.width, 
     [overlay boundingMapRect].size.height); 

Il est placé à

- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context. 

Toute aide serait génial. Un petit exemple de dessin d'image sur une carte avec Core Graphics sera impressionnant.

Merci, Tzur.

Répondre

0

SOLVED

La façon d'accéder à une propriété d'une classe dont j'inherit est d'utiliser « super ». ou, dans mon cas, [Super superposition].