IOS7: MKTileOverlayRenderer with tile size greater than 256

I want to use custom 512x512px map slices using MKTileOverlay / MKTileOverlayRenderer. My custom MKTileOverlayRenderer that draws each frame border looks like this:

-(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 as follows:

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

      

This is great for tile sizes like 128 or 256. But for a size of 512 (or larger) there is "unused" space between each tile, and the tile size remains at 256 pixels, as shown in this image:

Tile size of 512 pixel

How can I draw a full 512 pixel slab?

+3
ios7 mkmapview mktileoverlay


source to share


No one has answered this question yet

Check out similar questions:

614
Why is there an extra padding added at the top of my UITableView with style UITableViewStyleGrouped in iOS7
267
Can't hide status bar in iOS7
242
Explanation of the difference between automaticallyAdjustsScrollViewInsets, extendedLayoutIncludesOpaqueBars, edgeForExtendedLayout in iOS7
2
Can't get MKTileOverlay to support 1024 x 1024 tiles ...
2
Why is my custom MKTileOverlayRenderer drawing the same tile in multiple locations?
2
MapKit Overlays with kCGBlendModeMultiply
1
iOS 7 is there a way to know when MKTileOverlay is finished loading tiles?
1
Increase tile size in MKMapView
0
MKMapView crashes when view is disabled when reinstalling ios7 tiles
0
Drawing text with MKOverlayRenderer



All Articles
Loading...
X
Show
Funny
Dev
Pics