Authored by Joseph G

Refactored a bit of code to help the cloudmate guys.

... ... @@ -20,4 +20,6 @@
RMFractalTileProjection *tileProjection;
}
+(int)tileSideLength;
@end
... ...
... ... @@ -26,7 +26,9 @@
bounds.origin.y = -20037508.34;
bounds.size.width = 20037508.34 * 2;
bounds.size.height = 20037508.34 * 2;
tileProjection = [[RMFractalTileProjection alloc] initWithBounds:bounds TileSideLength:256 MaxZoom:18];
int sideLength = [[self class] tileSideLength];
tileProjection = [[RMFractalTileProjection alloc] initWithBounds:bounds TileSideLength:sideLength MaxZoom:18];
return self;
}
... ... @@ -37,6 +39,11 @@
[super dealloc];
}
+(int)tileSideLength
{
return 256;
}
-(NSString*) tileURL: (RMTile) tile
{
@throw [NSException exceptionWithName:@"RMAbstractMethodInvocation" reason:@"tileURL invoked on AbstractMercatorWebSource. Override this method when instantiating abstract class." userInfo:nil];
... ... @@ -46,7 +53,6 @@
{
tile = [tileProjection normaliseTile:tile];
RMTileImage* image = [RMTileImage imageWithTile: tile FromURL:[self tileURL:tile]];
// [cache addTile:tile WithImage:image];
return image;
}
... ... @@ -65,7 +71,5 @@
return [tileProjection bounds];
}
//@synthesize cache;
@end
... ...
... ... @@ -26,9 +26,4 @@
-(RMMercatorRect) bounds;
//
//@optional
//
//-(void) setCache: (TileCache*)cache;
@end
... ...