3

I want to use custom map tiles of 512x512 pixels with the MKTileOverlay/MKTileOverlayRenderer. My custom MKTileOverlayRenderer which draws each frame's border looks as follows:

-(void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CGContextRef)context
{
    CGRect rect = [self rectForMapRect:mapRect];
    CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
    CGContextSetLineWidth(context, 1.0/zoomScale);
    CGContextStrokeRect(context, rect);
}

The tile size is set this way:

self.tileOverlay.tileSize = CGSizeMake(512, 512);

This works fine for tile sizes of for instance 128 or 256. But for a size of 512 (or greater) there is "unused" space between each tile and the tile size remains at 256 pixels as shown in this picture:

Tile size of 512 pixel

How can I draw the full 512 pixel tile?

Hyndrix
  • 4,282
  • 7
  • 41
  • 82
  • This appears to be a bug in iOS 7, but works ok in iOS 8. I am working on an alternative to `MKTileOverlayRenderer` to get around this as well as the fact that there is a different bug in iOS 8 that causes Core Graphics image drawing errors. – incanus Dec 03 '14 at 20:48

0 Answers0