Authored by Joseph G

Made CoreAnimationRenderer work

@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 13
14 @interface CoreAnimationRenderer : MapRenderer { 14 @interface CoreAnimationRenderer : MapRenderer {
15 // CALayer *layer; 15 // CALayer *layer;
16 - LayeredTileLoader *imageSet; 16 + LayeredTileLoader *tileLoader;
17 } 17 }
18 18
19 @end 19 @end
@@ -11,19 +11,23 @@ @@ -11,19 +11,23 @@
11 #import <QuartzCore/QuartzCore.h> 11 #import <QuartzCore/QuartzCore.h>
12 #import "LayeredTileLoader.h" 12 #import "LayeredTileLoader.h"
13 #import "MathUtils.h" 13 #import "MathUtils.h"
  14 +#import "LayerToScreenProjection.h"
14 15
15 @implementation CoreAnimationRenderer 16 @implementation CoreAnimationRenderer
16 17
17 - (id) initWithView: (MapView *)_view 18 - (id) initWithView: (MapView *)_view
18 { 19 {
19 - if (![super initWithView:_view]) 20 + ScreenProjection *_proj = [[ScreenProjection alloc] initWithBounds:[_view bounds]];
  21 + //[[LayerToScreenProjection alloc] initWithBounds:[_view bounds] InLayer:[_view layer]];
  22 +
  23 + if (![super initWithView:_view ProjectingIn:_proj])
20 return nil; 24 return nil;
21 25
22 // tileLayer.position = CGPointMake(0.0f,0.0f); 26 // tileLayer.position = CGPointMake(0.0f,0.0f);
23 // tileLayer.transform = CATransform3DIdentity; 27 // tileLayer.transform = CATransform3DIdentity;
24 // tileLayer.bounds = [view bounds]; 28 // tileLayer.bounds = [view bounds];
25 29
26 - imageSet = [[LayeredTileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]]; 30 + tileLoader = [[LayeredTileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
27 /* 31 /*
28 layer = [CAScrollLayer layer]; 32 layer = [CAScrollLayer layer];
29 layer.anchorPoint = CGPointMake(0.0f, 0.0f); 33 layer.anchorPoint = CGPointMake(0.0f, 0.0f);
@@ -32,38 +36,27 @@ @@ -32,38 +36,27 @@
32 36
33 // [layer addSublayer:sublayer]; 37 // [layer addSublayer:sublayer];
34 38
35 - [view.layer addSublayer:[imageSet layer]]; 39 + [view.layer addSublayer:[tileLoader layer]];
36 40
37 return self; 41 return self;
38 } 42 }
39 43
40 --(void) recalculateImageSet 44 +-(void)mapImageLoaded: (NSNotification*)notification
41 { 45 {
42 - // NSLog(@"recalc");  
43 -// TileRect tileRect = [[[view tileSource] tileProjection] project:screenProjection];  
44 -// [imageSet assembleFromRect:tileRect FromImageSource:[view tileSource] ToDisplayIn:[view bounds] WithTileDelegate:self];  
45 } 46 }
46 47
47 -- (void)setNeedsDisplay 48 +-(void) recalculateImageSet
48 { 49 {
49 -// int loadedZoom = [imageSet loadedZoom];  
50 -// float scale = [screenProjection scale];  
51 -// int properZoom = [[[view tileSource] tileProjection] calculateNormalisedZoomFromScale:scale];  
52 -// if (![imageSet containsRect:[view bounds]]  
53 -// || loadedZoom != properZoom)  
54 - {  
55 - // NSLog(@"loadedZoom = %d properZoom = %d", loadedZoom, properZoom);  
56 -  
57 - // CGRect bounds = [view bounds];  
58 - // NSLog(@"view bounds: %f x %f %f x %f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);  
59 -  
60 - // CGRect loadedBounds = [imageSet loadedBounds];  
61 - // NSLog(@"loadedBounds: %f x %f %f x %f", loadedBounds.origin.x, loadedBounds.origin.y, loadedBounds.size.width, loadedBounds.size.height);  
62 -  
63 - [self recalculateImageSet];  
64 - } 50 + [CATransaction begin];
  51 + [CATransaction setValue:[NSNumber numberWithFloat:0.0f]
  52 + forKey:kCATransactionAnimationDuration];
  53 +
  54 + [CATransaction setValue:(id)kCFBooleanTrue
  55 + forKey:kCATransactionDisableActions];
  56 +
  57 + [tileLoader assemble];
65 58
66 - [super setNeedsDisplay]; 59 + [CATransaction commit];
67 } 60 }
68 61
69 -(void) moveToMercator: (MercatorPoint) point 62 -(void) moveToMercator: (MercatorPoint) point
@@ -77,14 +70,33 @@ @@ -77,14 +70,33 @@
77 70
78 - (void)moveBy: (CGSize) delta 71 - (void)moveBy: (CGSize) delta
79 { 72 {
80 - [imageSet moveBy:delta]; 73 + [CATransaction begin];
  74 + [CATransaction setValue:[NSNumber numberWithFloat:0.0f]
  75 + forKey:kCATransactionAnimationDuration];
  76 +
  77 + [CATransaction setValue:(id)kCFBooleanTrue
  78 + forKey:kCATransactionDisableActions];
  79 +
81 [super moveBy:delta]; 80 [super moveBy:delta];
  81 + [tileLoader moveBy:delta];
  82 + [tileLoader assemble];
  83 +
  84 + [CATransaction commit];
82 } 85 }
83 86
84 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center 87 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
85 { 88 {
86 - [imageSet zoomByFactor:zoomFactor Near:center]; 89 + [CATransaction begin];
  90 + [CATransaction setValue:[NSNumber numberWithFloat:0.0f]
  91 + forKey:kCATransactionAnimationDuration];
  92 +
  93 + [CATransaction setValue:(id)kCFBooleanTrue
  94 + forKey:kCATransactionDisableActions];
87 [super zoomByFactor:zoomFactor Near:center]; 95 [super zoomByFactor:zoomFactor Near:center];
  96 + [tileLoader zoomByFactor:zoomFactor Near:center];
  97 + [tileLoader assemble];
  98 +
  99 + [CATransaction commit];
88 } 100 }
89 101
90 102
1 -//  
2 -// FileCache.h  
3 -// Images  
4 -//  
5 -// Created by Joseph Gentle on 31/08/08.  
6 -// Copyright 2008 __MyCompanyName__. All rights reserved.  
7 -//  
8 -  
9 -#import <UIKit/UIKit.h>  
10 -#import "TileCache.h"  
11 -  
12 -@interface FileCache : TileCache  
13 -{  
14 -  
15 -}  
16 -  
17 -@end  
1 -//  
2 -// FileCache.m  
3 -// Images  
4 -//  
5 -// Created by Joseph Gentle on 31/08/08.  
6 -// Copyright 2008 __MyCompanyName__. All rights reserved.  
7 -//  
8 -  
9 -#import "FileCache.h"  
10 -  
11 -  
12 -@implementation FileCache  
13 -  
14 --(TileImage*) cachedImage:(Tile)tile  
15 -{  
16 - return nil;  
17 -}  
18 -  
19 --(void)addTile: (Tile)tile WithImage: (TileImage*)image  
20 -{  
21 -  
22 -}  
23 -  
24 -@end  
@@ -16,6 +16,12 @@ @@ -16,6 +16,12 @@
16 if (![super initWithTile:_tile]) 16 if (![super initWithTile:_tile])
17 return nil; 17 return nil;
18 18
  19 + // From the example in the documentation... :-/
  20 +/* CFURLRef url = CFURLCreateWithFileSystemPath (NULL, (CFStringRef)file, kCFURLPOSIXPathStyle, false);
  21 + CGDataProviderRef provider = CGDataProviderCreateWithURL (url);
  22 + CFRelease (url);
  23 + image = CGImageCreateWithPNGDataProvider (provider, NULL, true, kCGRenderingIntentDefault);
  24 +*/
19 image = [[UIImage alloc] initWithContentsOfFile:file]; 25 image = [[UIImage alloc] initWithContentsOfFile:file];
20 [image retain]; 26 [image retain];
21 // [self setImageToData:data]; 27 // [self setImageToData:data];
@@ -23,10 +29,4 @@ @@ -23,10 +29,4 @@
23 return self; 29 return self;
24 } 30 }
25 31
26 --(void)dealloc  
27 -{  
28 - [image release];  
29 - [super dealloc];  
30 -}  
31 -  
32 @end 32 @end
1 -//  
2 -// LayeredTileImageSet.h  
3 -// RouteMe  
4 -//  
5 -// Created by Joseph Gentle on 9/09/08.  
6 -// Copyright 2008 __MyCompanyName__. All rights reserved.  
7 -//  
8 -  
9 -#import <UIKit/UIKit.h>  
10 -#import "TileLoader.h"  
11 -  
12 -@interface LayeredTileImageSet : TileLoader {  
13 - CALayer *layer;  
14 -  
15 -}  
16 -  
17 -@end  
1 -//  
2 -// LayeredTileImageSet.m  
3 -// RouteMe  
4 -//  
5 -// Created by Joseph Gentle on 9/09/08.  
6 -// Copyright 2008 __MyCompanyName__. All rights reserved.  
7 -//  
8 -  
9 -#import "LayeredTileImageSet.h"  
10 -  
11 -  
12 -@implementation LayeredTileImageSet  
13 -  
14 -//-(id) initWithBounds:  
15 -  
16 -@end  
@@ -13,8 +13,6 @@ @@ -13,8 +13,6 @@
13 13
14 @interface LayeredTileLoader : TileLoader { 14 @interface LayeredTileLoader : TileLoader {
15 CALayer *layer; 15 CALayer *layer;
16 -  
17 - MercatorPoint layerPositionOffset;  
18 } 16 }
19 17
20 @property (readonly, nonatomic) CALayer *layer; 18 @property (readonly, nonatomic) CALayer *layer;
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 #import "LayeredTileLoader.h" 9 #import "LayeredTileLoader.h"
10 #import "ScreenProjection.h" 10 #import "ScreenProjection.h"
11 #import <QuartzCore/QuartzCore.h> 11 #import <QuartzCore/QuartzCore.h>
12 -#import "MathUtils.h" 12 +#import "TileImage.h"
13 13
14 @implementation LayeredTileLoader 14 @implementation LayeredTileLoader
15 15
@@ -30,54 +30,55 @@ @@ -30,54 +30,55 @@
30 30
31 layer = [CAScrollLayer layer]; 31 layer = [CAScrollLayer layer];
32 layer.anchorPoint = CGPointMake(0.0f, 0.0f); 32 layer.anchorPoint = CGPointMake(0.0f, 0.0f);
33 - 33 + layer.masksToBounds = YES;
34 if (screen != nil) 34 if (screen != nil)
35 { 35 {
36 layer.frame = [screen screenBounds]; 36 layer.frame = [screen screenBounds];
37 - layerPositionOffset = [screen topLeft]; 37 +// layerPositionOffset = [screen topLeft];
38 } 38 }
39 39
40 - CALayer *sublayer = [CALayer layer];  
41 - sublayer.frame = CGRectMake(100, 100, 256, 256);  
42 - NSString *path = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];  
43 - CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);  
44 - CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);  
45 - sublayer.contents = (id)image;  
46 -  
47 - [layer addSublayer:sublayer];  
48 - 40 +// CALayer *sublayer = [CALayer layer];
  41 +// sublayer.frame = CGRectMake(160, 100, 256, 256);
  42 +// NSString *path = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];
  43 +// CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);
  44 +// CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);
  45 +// sublayer.contents = (id)image;
  46 +// [layer addSublayer:sublayer];
  47 +
49 return self; 48 return self;
50 } 49 }
51 50
52 -- (void)moveBy: (CGSize) delta 51 +- (void)tileAdded: (Tile) tile WithImage: (TileImage*) image;
53 { 52 {
54 - [CATransaction begin];  
55 - [CATransaction setValue:[NSNumber numberWithFloat:0.0f]  
56 - forKey:kCATransactionAnimationDuration]; 53 + [image makeLayer];
57 54
58 - layer.position = TranslateCGPointBy(layer.position, delta);  
59 - [super moveBy:delta]; 55 + CALayer *sublayer = [image layer];
60 56
61 - [CATransaction commit];  
62 -} 57 +// CGRect frame = image.screenLocation;
63 58
64 -- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center  
65 -{  
66 - [CATransaction begin];  
67 - [CATransaction setValue:[NSNumber numberWithFloat:0.0f]  
68 - forKey:kCATransactionAnimationDuration]; 59 +// frame.origin.x -= layer.position.x;
  60 +// frame.origin.y -= layer.position.y;
69 61
70 - CATransform3D transform = layer.transform;  
71 - transform = CATransform3DTranslate(transform, center.x, center.y, 0.0f);  
72 - transform = CATransform3DScale(transform, zoomFactor, zoomFactor, 1.0f);  
73 - transform = CATransform3DTranslate(transform, -center.x, -center.y, 0.0f);  
74 - layer.transform = transform; 62 +// NSLog(@"Frame at %f %f %f,%f", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
  63 +// NSLog(@"frame position %f,%f", layer.position.x, layer.position.y);
75 64
76 - [super zoomByFactor:zoomFactor Near:center]; 65 +// sublayer.frame = frame;//GRectMake(layer.position.x, layer.position.y, 256, 256);
77 66
78 - [CATransaction commit]; 67 + [layer addSublayer:sublayer];
  68 +
  69 +// NSLog(@"added subimage");
79 } 70 }
80 71
  72 +-(void) tileRemoved: (Tile) tile
  73 +{
  74 + TileImage *image = [images imageWithTile:tile];
  75 +
  76 + [[image layer] removeFromSuperlayer];
  77 +
  78 + [[NSNotificationCenter defaultCenter] postNotificationName:MapImageRemovedFromScreenNotification object:image];
  79 +
  80 +// NSLog(@"subimage removed");
  81 +}
81 82
82 //-(id) initWithBounds: 83 //-(id) initWithBounds:
83 84
@@ -18,6 +18,9 @@ @@ -18,6 +18,9 @@
18 MapView *view; 18 MapView *view;
19 } 19 }
20 20
  21 +// Designated initialiser
  22 +- (id) initWithView: (MapView *)_view ProjectingIn: (ScreenProjection*) _screenProjection;
  23 +// This makes a screen projection from the view
21 - (id) initWithView: (MapView *)view; 24 - (id) initWithView: (MapView *)view;
22 25
23 - (void)drawRect:(CGRect)rect; 26 - (void)drawRect:(CGRect)rect;
@@ -28,6 +31,7 @@ @@ -28,6 +31,7 @@
28 - (void)moveBy: (CGSize) delta; 31 - (void)moveBy: (CGSize) delta;
29 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center; 32 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
30 33
  34 +-(void) recalculateImageSet;
31 - (void)setNeedsDisplay; 35 - (void)setNeedsDisplay;
32 36
33 @property (readwrite) double scale; 37 @property (readwrite) double scale;
@@ -16,13 +16,14 @@ @@ -16,13 +16,14 @@
16 16
17 @implementation MapRenderer 17 @implementation MapRenderer
18 18
19 -- (id) initWithView: (MapView *)_view 19 +// Designated initialiser
  20 +- (id) initWithView: (MapView *)_view ProjectingIn: (ScreenProjection*) _screenProjection
20 { 21 {
21 if (![super init]) 22 if (![super init])
22 return nil; 23 return nil;
23 24
24 view = _view; 25 view = _view;
25 - screenProjection = [[ScreenProjection alloc] initWithBounds:[view bounds]]; 26 + screenProjection = _screenProjection;//[[ScreenProjection alloc] initWithBounds:[view bounds]];
26 27
27 CLLocationCoordinate2D here; 28 CLLocationCoordinate2D here;
28 here.latitude = -33.9464; 29 here.latitude = -33.9464;
@@ -35,6 +36,13 @@ @@ -35,6 +36,13 @@
35 return self; 36 return self;
36 } 37 }
37 38
  39 +- (id) initWithView: (MapView *)_view
  40 +{
  41 + ScreenProjection *_screenProjection = [[ScreenProjection alloc] initWithBounds:[_view bounds]];
  42 + return [self initWithView:_view ProjectingIn:_screenProjection];
  43 +}
  44 +
  45 +
38 -(void) dealloc 46 -(void) dealloc
39 { 47 {
40 [screenProjection release]; 48 [screenProjection release];
@@ -62,17 +70,22 @@ @@ -62,17 +70,22 @@
62 - (void)moveBy: (CGSize) delta 70 - (void)moveBy: (CGSize) delta
63 { 71 {
64 [screenProjection moveBy:delta]; 72 [screenProjection moveBy:delta];
65 - [self setNeedsDisplay]; 73 + [view setNeedsDisplay];
66 } 74 }
67 75
68 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center 76 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
69 { 77 {
70 [screenProjection zoomByFactor:zoomFactor Near:center]; 78 [screenProjection zoomByFactor:zoomFactor Near:center];
71 - [self setNeedsDisplay]; 79 + [view setNeedsDisplay];
  80 +}
  81 +
  82 +-(void) recalculateImageSet
  83 +{
72 } 84 }
73 85
74 - (void)setNeedsDisplay 86 - (void)setNeedsDisplay
75 { 87 {
  88 + [self recalculateImageSet];
76 [view setNeedsDisplay]; 89 [view setNeedsDisplay];
77 } 90 }
78 91
@@ -28,7 +28,6 @@ @@ -28,7 +28,6 @@
28 return; 28 return;
29 29
30 tileSource = [[OpenStreetMapsSource alloc] init]; 30 tileSource = [[OpenStreetMapsSource alloc] init];
31 -// tileSource = [[MemoryCache alloc] initWithParentSource:tileSource Capacity:20];  
32 } 31 }
33 32
34 -(void) makeRenderer 33 -(void) makeRenderer
@@ -41,8 +40,8 @@ @@ -41,8 +40,8 @@
41 if (renderer != nil) 40 if (renderer != nil)
42 return; 41 return;
43 42
44 - renderer = [[QuartzRenderer alloc] initWithView:self];  
45 -// renderer = [[CoreAnimationRenderer alloc] initWithView:self]; 43 +// renderer = [[QuartzRenderer alloc] initWithView:self];
  44 + renderer = [[CoreAnimationRenderer alloc] initWithView:self];
46 } 45 }
47 46
48 /* 47 /*
@@ -123,23 +122,18 @@ @@ -123,23 +122,18 @@
123 [super dealloc]; 122 [super dealloc];
124 } 123 }
125 124
126 -- (void)drawRect:(CGRect)rect  
127 -{  
128 - [renderer drawRect: rect];  
129 -}  
130 125
131 -/*  
132 - (void)drawRect:(CGRect)rect { 126 - (void)drawRect:(CGRect)rect {
133 // imageSet = [tileSource tileImagesForScreen: screenProjection]; 127 // imageSet = [tileSource tileImagesForScreen: screenProjection];
134 - if ([imageSet needsRedraw]) 128 +// if ([imageSet needsRedraw])
135 { 129 {
136 // [self recalculateImageSet]; 130 // [self recalculateImageSet];
137 - NSLog(@"WARNING - Image set needs redraw and we're in drawRect."); 131 +// NSLog(@"WARNING - Image set needs redraw and we're in drawRect.");
138 } 132 }
139 - [imageSet draw]; 133 + [renderer drawRect:rect];
140 134
141 // [self setNeedsDisplay]; 135 // [self setNeedsDisplay];
142 -}*/ 136 +}
143 137
144 /* 138 /*
145 - (NSSet*) touchesOnScreenIn: (UIEvent *)event 139 - (NSSet*) touchesOnScreenIn: (UIEvent *)event
@@ -228,6 +222,16 @@ @@ -228,6 +222,16 @@
228 { 222 {
229 lastGesture = [self getGestureDetails:[event allTouches]]; 223 lastGesture = [self getGestureDetails:[event allTouches]];
230 224
  225 + for (UITouch *touch in touches)
  226 + {
  227 + if ([touch phase] == UITouchPhaseBegan
  228 + || [touch phase] == UITouchPhaseMoved
  229 + || [touch phase] == UITouchPhaseStationary)
  230 + return;
  231 + }
  232 +
  233 + NSLog(@"Assemble.");
  234 + [renderer recalculateImageSet];
231 // NSLog(@"touchesEnded %d ... lastgesture at %f, %f", [[event allTouches] count], lastGesture.center.x, lastGesture.center.y); 235 // NSLog(@"touchesEnded %d ... lastgesture at %f, %f", [[event allTouches] count], lastGesture.center.x, lastGesture.center.y);
232 } 236 }
233 237
@@ -266,6 +270,7 @@ @@ -266,6 +270,7 @@
266 270
267 // if ([imageSet needsRedraw]) 271 // if ([imageSet needsRedraw])
268 // [self recalculateImageSet]; 272 // [self recalculateImageSet];
  273 +
269 } 274 }
270 275
271 @end 276 @end
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 40
41 -(void) removeTile: (Tile) tile 41 -(void) removeTile: (Tile) tile
42 { 42 {
43 -// NSLog(@"tile removed from cache"); 43 + NSLog(@"tile removed from cache");
44 [cache removeObjectForKey:[TileCache tileHash: tile]]; 44 [cache removeObjectForKey:[TileCache tileHash: tile]];
45 } 45 }
46 46
@@ -14,8 +14,7 @@ @@ -14,8 +14,7 @@
14 @class TileLoader; 14 @class TileLoader;
15 15
16 @interface QuartzRenderer : MapRenderer { 16 @interface QuartzRenderer : MapRenderer {
17 - // This is basically a one-object allocation pool.  
18 - TileLoader *imageSet; 17 + TileLoader *tileLoader;
19 } 18 }
20 19
21 @end 20 @end
@@ -22,55 +22,39 @@ @@ -22,55 +22,39 @@
22 if (![super initWithView:_view]) 22 if (![super initWithView:_view])
23 return nil; 23 return nil;
24 24
25 - imageSet = [[TileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]]; 25 + tileLoader = [[TileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
26 26
27 return self; 27 return self;
28 } 28 }
29 29
30 --(void) recalculateImageSet 30 +-(void) dealloc
31 { 31 {
32 -// NSLog(@"recalc");  
33 -// TileRect tileRect = [[[view tileSource] tileProjection] project:screenProjection];  
34 -// [imageSet assembleFromRect:tileRect FromImageSource:[view tileSource] ToDisplayIn:[view bounds] WithTileDelegate:self]; 32 + [tileLoader release];
  33 + [super dealloc];
35 } 34 }
36 35
37 -- (void)drawRect:(CGRect)rect 36 +-(void) recalculateImageSet
38 { 37 {
39 - [imageSet draw]; 38 + [tileLoader assemble];
40 } 39 }
41 40
42 -- (void)setNeedsDisplay 41 +- (void)drawRect:(CGRect)rect
43 { 42 {
44 - int loadedZoom = [imageSet loadedZoom];  
45 - float scale = [screenProjection scale];  
46 - int properZoom = [[[view tileSource] tileProjection] calculateNormalisedZoomFromScale:scale];  
47 - if (![imageSet containsRect:[view bounds]]  
48 - || loadedZoom != properZoom)  
49 - {  
50 -// NSLog(@"loadedZoom = %d properZoom = %d", loadedZoom, properZoom);  
51 -  
52 -// CGRect bounds = [view bounds];  
53 -// NSLog(@"view bounds: %f x %f %f x %f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);  
54 -  
55 -// CGRect loadedBounds = [imageSet loadedBounds];  
56 -// NSLog(@"loadedBounds: %f x %f %f x %f", loadedBounds.origin.x, loadedBounds.origin.y, loadedBounds.size.width, loadedBounds.size.height);  
57 -  
58 - [self recalculateImageSet];  
59 - }  
60 -  
61 - [super setNeedsDisplay]; 43 + [tileLoader draw];
62 } 44 }
63 45
64 - (void)moveBy: (CGSize) delta 46 - (void)moveBy: (CGSize) delta
65 { 47 {
66 - [imageSet moveBy:delta];  
67 [super moveBy:delta]; 48 [super moveBy:delta];
  49 + [tileLoader moveBy:delta];
  50 + [tileLoader assemble];
68 } 51 }
69 52
70 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center 53 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
71 { 54 {
72 - [imageSet zoomByFactor:zoomFactor Near:center];  
73 [super zoomByFactor:zoomFactor Near:center]; 55 [super zoomByFactor:zoomFactor Near:center];
  56 + [tileLoader zoomByFactor:zoomFactor Near:center];
  57 + [tileLoader assemble];
74 } 58 }
75 59
76 - (void)tileDidFinishLoading: (TileImage *)image 60 - (void)tileDidFinishLoading: (TileImage *)image
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 B87626D00E752A010024B9C5 /* MapRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626CE0E752A010024B9C5 /* MapRenderer.h */; }; 12 B87626D00E752A010024B9C5 /* MapRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626CE0E752A010024B9C5 /* MapRenderer.h */; };
13 B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */; }; 13 B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */; };
14 B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */; }; 14 B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */; };
15 - B87626E90E7562620024B9C5 /* TileImageSet.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428260E6BEA390080B2F5 /* TileImageSet.m */; }; 15 + B87626E90E7562620024B9C5 /* TileLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428260E6BEA390080B2F5 /* TileLoader.m */; };
16 B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626EF0E75654C0024B9C5 /* MathUtils.h */; }; 16 B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626EF0E75654C0024B9C5 /* MathUtils.h */; };
17 B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = B87626F00E75654C0024B9C5 /* MathUtils.c */; }; 17 B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = B87626F00E75654C0024B9C5 /* MathUtils.c */; };
18 B894284D0E6BEAB20080B2F5 /* ImagesAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B894284B0E6BEAB20080B2F5 /* ImagesAppDelegate.m */; }; 18 B894284D0E6BEAB20080B2F5 /* ImagesAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B894284B0E6BEAB20080B2F5 /* ImagesAppDelegate.m */; };
@@ -35,6 +35,13 @@ @@ -35,6 +35,13 @@
35 B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8790E757FC8005509DE /* MapRenderer.m */; }; 35 B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8790E757FC8005509DE /* MapRenderer.m */; };
36 B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */; }; 36 B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */; };
37 B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */; }; 37 B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */; };
  38 + B8A5C9220E75A107005509DE /* LayeredTileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5C9200E75A107005509DE /* LayeredTileLoader.h */; };
  39 + B8A5C9230E75A107005509DE /* LayeredTileLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C9210E75A107005509DE /* LayeredTileLoader.m */; };
  40 + B8A5C9BF0E763371005509DE /* Tile.c in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C9BE0E763371005509DE /* Tile.c */; };
  41 + B8A5CB170E764C84005509DE /* TileImageSet.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5CB150E764C84005509DE /* TileImageSet.h */; };
  42 + B8A5CB180E764C84005509DE /* TileImageSet.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5CB160E764C84005509DE /* TileImageSet.m */; };
  43 + B8C6B1290E78C79200C12A12 /* LayerToScreenProjection.h in Headers */ = {isa = PBXBuildFile; fileRef = B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */; };
  44 + B8C6B12A0E78C79200C12A12 /* LayerToScreenProjection.m in Sources */ = {isa = PBXBuildFile; fileRef = B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */; };
38 B8D9B0640E6BEBCC00EDA368 /* FlipsideView.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428440E6BEA3A0080B2F5 /* FlipsideView.m */; }; 45 B8D9B0640E6BEBCC00EDA368 /* FlipsideView.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428440E6BEA3A0080B2F5 /* FlipsideView.m */; };
39 B8D9B0BD0E6BECD400EDA368 /* pj_tsfn.c in Sources */ = {isa = PBXBuildFile; fileRef = B89428140E6BEA390080B2F5 /* pj_tsfn.c */; }; 46 B8D9B0BD0E6BECD400EDA368 /* pj_tsfn.c in Sources */ = {isa = PBXBuildFile; fileRef = B89428140E6BEA390080B2F5 /* pj_tsfn.c */; };
40 B8D9B0BE0E6BECD400EDA368 /* PJ_tmerc.c in Sources */ = {isa = PBXBuildFile; fileRef = B89427AC0E6BEA390080B2F5 /* PJ_tmerc.c */; }; 47 B8D9B0BE0E6BECD400EDA368 /* PJ_tmerc.c in Sources */ = {isa = PBXBuildFile; fileRef = B89427AC0E6BEA390080B2F5 /* PJ_tmerc.c */; };
@@ -194,7 +201,7 @@ @@ -194,7 +201,7 @@
194 B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428290E6BEA390080B2F5 /* MemoryCache.m */; }; 201 B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428290E6BEA390080B2F5 /* MemoryCache.m */; };
195 B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = B894283A0E6BEA3A0080B2F5 /* TiledLayerController.m */; }; 202 B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = B894283A0E6BEA3A0080B2F5 /* TiledLayerController.m */; };
196 B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428360E6BEA3A0080B2F5 /* Mercator.m */; }; 203 B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428360E6BEA3A0080B2F5 /* Mercator.m */; };
197 - B8D9B1F50E6BFA7500EDA368 /* FileCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282B0E6BEA390080B2F5 /* FileCache.m */; }; 204 + B8D9B1F50E6BFA7500EDA368 /* DiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282B0E6BEA390080B2F5 /* DiskCache.m */; };
198 B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428340E6BEA390080B2F5 /* Transform.m */; }; 205 B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428340E6BEA390080B2F5 /* Transform.m */; };
199 B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428240E6BEA390080B2F5 /* TileImage.m */; }; 206 B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428240E6BEA390080B2F5 /* TileImage.m */; };
200 B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282F0E6BEA390080B2F5 /* WebTileImage.m */; }; 207 B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282F0E6BEA390080B2F5 /* WebTileImage.m */; };
@@ -207,7 +214,7 @@ @@ -207,7 +214,7 @@
207 B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428370E6BEA3A0080B2F5 /* FractalTileProjection.h */; }; 214 B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428370E6BEA3A0080B2F5 /* FractalTileProjection.h */; };
208 B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428390E6BEA3A0080B2F5 /* TiledLayerController.h */; }; 215 B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428390E6BEA3A0080B2F5 /* TiledLayerController.h */; };
209 B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428230E6BEA390080B2F5 /* TileImage.h */; }; 216 B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428230E6BEA390080B2F5 /* TileImage.h */; };
210 - B8D9B2030E6BFA7F00EDA368 /* FileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282A0E6BEA390080B2F5 /* FileCache.h */; }; 217 + B8D9B2030E6BFA7F00EDA368 /* DiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282A0E6BEA390080B2F5 /* DiskCache.h */; };
211 B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282C0E6BEA390080B2F5 /* TileProxy.h */; }; 218 B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282C0E6BEA390080B2F5 /* TileProxy.h */; };
212 B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428280E6BEA390080B2F5 /* MemoryCache.h */; }; 219 B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428280E6BEA390080B2F5 /* MemoryCache.h */; };
213 B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428220E6BEA390080B2F5 /* Tile.h */; }; 220 B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428220E6BEA390080B2F5 /* Tile.h */; };
@@ -410,13 +417,13 @@ @@ -410,13 +417,13 @@
410 B89428220E6BEA390080B2F5 /* Tile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tile.h; sourceTree = "<group>"; }; 417 B89428220E6BEA390080B2F5 /* Tile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tile.h; sourceTree = "<group>"; };
411 B89428230E6BEA390080B2F5 /* TileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileImage.h; sourceTree = "<group>"; }; 418 B89428230E6BEA390080B2F5 /* TileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileImage.h; sourceTree = "<group>"; };
412 B89428240E6BEA390080B2F5 /* TileImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileImage.m; sourceTree = "<group>"; }; 419 B89428240E6BEA390080B2F5 /* TileImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileImage.m; sourceTree = "<group>"; };
413 - B89428250E6BEA390080B2F5 /* TileImageSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileImageSet.h; sourceTree = "<group>"; };  
414 - B89428260E6BEA390080B2F5 /* TileImageSet.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileImageSet.m; sourceTree = "<group>"; }; 420 + B89428250E6BEA390080B2F5 /* TileLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileLoader.h; sourceTree = "<group>"; };
  421 + B89428260E6BEA390080B2F5 /* TileLoader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileLoader.m; sourceTree = "<group>"; };
415 B89428270E6BEA390080B2F5 /* TileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileCache.h; sourceTree = "<group>"; }; 422 B89428270E6BEA390080B2F5 /* TileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileCache.h; sourceTree = "<group>"; };
416 B89428280E6BEA390080B2F5 /* MemoryCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryCache.h; sourceTree = "<group>"; }; 423 B89428280E6BEA390080B2F5 /* MemoryCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryCache.h; sourceTree = "<group>"; };
417 B89428290E6BEA390080B2F5 /* MemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MemoryCache.m; sourceTree = "<group>"; }; 424 B89428290E6BEA390080B2F5 /* MemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MemoryCache.m; sourceTree = "<group>"; };
418 - B894282A0E6BEA390080B2F5 /* FileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileCache.h; sourceTree = "<group>"; };  
419 - B894282B0E6BEA390080B2F5 /* FileCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FileCache.m; sourceTree = "<group>"; }; 425 + B894282A0E6BEA390080B2F5 /* DiskCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DiskCache.h; sourceTree = "<group>"; };
  426 + B894282B0E6BEA390080B2F5 /* DiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = DiskCache.m; sourceTree = "<group>"; };
420 B894282C0E6BEA390080B2F5 /* TileProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileProxy.h; sourceTree = "<group>"; }; 427 B894282C0E6BEA390080B2F5 /* TileProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileProxy.h; sourceTree = "<group>"; };
421 B894282D0E6BEA390080B2F5 /* TileProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileProxy.m; sourceTree = "<group>"; }; 428 B894282D0E6BEA390080B2F5 /* TileProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileProxy.m; sourceTree = "<group>"; };
422 B894282E0E6BEA390080B2F5 /* WebTileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebTileImage.h; sourceTree = "<group>"; }; 429 B894282E0E6BEA390080B2F5 /* WebTileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebTileImage.h; sourceTree = "<group>"; };
@@ -461,6 +468,13 @@ @@ -461,6 +468,13 @@
461 B8A5C8790E757FC8005509DE /* MapRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapRenderer.m; sourceTree = "<group>"; }; 468 B8A5C8790E757FC8005509DE /* MapRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapRenderer.m; sourceTree = "<group>"; };
462 B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreAnimationRenderer.h; sourceTree = "<group>"; }; 469 B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreAnimationRenderer.h; sourceTree = "<group>"; };
463 B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreAnimationRenderer.m; sourceTree = "<group>"; }; 470 B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreAnimationRenderer.m; sourceTree = "<group>"; };
  471 + B8A5C9200E75A107005509DE /* LayeredTileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayeredTileLoader.h; sourceTree = "<group>"; };
  472 + B8A5C9210E75A107005509DE /* LayeredTileLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LayeredTileLoader.m; sourceTree = "<group>"; };
  473 + B8A5C9BE0E763371005509DE /* Tile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Tile.c; sourceTree = "<group>"; };
  474 + B8A5CB150E764C84005509DE /* TileImageSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TileImageSet.h; sourceTree = "<group>"; };
  475 + B8A5CB160E764C84005509DE /* TileImageSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TileImageSet.m; sourceTree = "<group>"; };
  476 + B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerToScreenProjection.h; sourceTree = "<group>"; };
  477 + B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LayerToScreenProjection.m; sourceTree = "<group>"; };
464 B8D9B0B70E6BEC1900EDA368 /* libproj4.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libproj4.a; sourceTree = BUILT_PRODUCTS_DIR; }; 478 B8D9B0B70E6BEC1900EDA368 /* libproj4.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libproj4.a; sourceTree = BUILT_PRODUCTS_DIR; };
465 B8D9B17D0E6BF0D600EDA368 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; 479 B8D9B17D0E6BF0D600EDA368 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
466 B8D9B17E0E6BF0DD00EDA368 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; }; 480 B8D9B17E0E6BF0DD00EDA368 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
@@ -539,6 +553,8 @@ @@ -539,6 +553,8 @@
539 B87626D30E752B640024B9C5 /* Quartz Renderer */, 553 B87626D30E752B640024B9C5 /* Quartz Renderer */,
540 B8A5C8780E757E95005509DE /* Core Animation Renderer */, 554 B8A5C8780E757E95005509DE /* Core Animation Renderer */,
541 B87626D20E752B280024B9C5 /* Tiled Layer Renderer */, 555 B87626D20E752B280024B9C5 /* Tiled Layer Renderer */,
  556 + B89428250E6BEA390080B2F5 /* TileLoader.h */,
  557 + B89428260E6BEA390080B2F5 /* TileLoader.m */,
542 B87626C80E7529BE0024B9C5 /* ScreenProjection.h */, 558 B87626C80E7529BE0024B9C5 /* ScreenProjection.h */,
543 B87626C90E7529BE0024B9C5 /* ScreenProjection.m */, 559 B87626C90E7529BE0024B9C5 /* ScreenProjection.m */,
544 B87626CE0E752A010024B9C5 /* MapRenderer.h */, 560 B87626CE0E752A010024B9C5 /* MapRenderer.h */,
@@ -559,8 +575,6 @@ @@ -559,8 +575,6 @@
559 B87626D30E752B640024B9C5 /* Quartz Renderer */ = { 575 B87626D30E752B640024B9C5 /* Quartz Renderer */ = {
560 isa = PBXGroup; 576 isa = PBXGroup;
561 children = ( 577 children = (
562 - B89428250E6BEA390080B2F5 /* TileImageSet.h */,  
563 - B89428260E6BEA390080B2F5 /* TileImageSet.m */,  
564 B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */, 578 B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */,
565 B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */, 579 B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */,
566 ); 580 );
@@ -574,8 +588,8 @@ @@ -574,8 +588,8 @@
574 B8A51E900E6D7192006AA8E2 /* TileCache.m */, 588 B8A51E900E6D7192006AA8E2 /* TileCache.m */,
575 B89428280E6BEA390080B2F5 /* MemoryCache.h */, 589 B89428280E6BEA390080B2F5 /* MemoryCache.h */,
576 B89428290E6BEA390080B2F5 /* MemoryCache.m */, 590 B89428290E6BEA390080B2F5 /* MemoryCache.m */,
577 - B894282A0E6BEA390080B2F5 /* FileCache.h */,  
578 - B894282B0E6BEA390080B2F5 /* FileCache.m */, 591 + B894282A0E6BEA390080B2F5 /* DiskCache.h */,
  592 + B894282B0E6BEA390080B2F5 /* DiskCache.m */,
579 ); 593 );
580 name = Cache; 594 name = Cache;
581 sourceTree = "<group>"; 595 sourceTree = "<group>";
@@ -755,8 +769,8 @@ @@ -755,8 +769,8 @@
755 B87626CC0E7529CF0024B9C5 /* Renderers */, 769 B87626CC0E7529CF0024B9C5 /* Renderers */,
756 B894283B0E6BEA3A0080B2F5 /* MapView.h */, 770 B894283B0E6BEA3A0080B2F5 /* MapView.h */,
757 B894283C0E6BEA3A0080B2F5 /* MapView.m */, 771 B894283C0E6BEA3A0080B2F5 /* MapView.m */,
758 - B89428300E6BEA390080B2F5 /* Projections */,  
759 B89428210E6BEA390080B2F5 /* Tile Management */, 772 B89428210E6BEA390080B2F5 /* Tile Management */,
  773 + B89428300E6BEA390080B2F5 /* Projections */,
760 B894281D0E6BEA390080B2F5 /* Tile Source */, 774 B894281D0E6BEA390080B2F5 /* Tile Source */,
761 ); 775 );
762 name = "Map View"; 776 name = "Map View";
@@ -777,6 +791,7 @@ @@ -777,6 +791,7 @@
777 children = ( 791 children = (
778 B87626D40E752DF30024B9C5 /* Cache */, 792 B87626D40E752DF30024B9C5 /* Cache */,
779 B89428220E6BEA390080B2F5 /* Tile.h */, 793 B89428220E6BEA390080B2F5 /* Tile.h */,
  794 + B8A5C9BE0E763371005509DE /* Tile.c */,
780 B89428230E6BEA390080B2F5 /* TileImage.h */, 795 B89428230E6BEA390080B2F5 /* TileImage.h */,
781 B89428240E6BEA390080B2F5 /* TileImage.m */, 796 B89428240E6BEA390080B2F5 /* TileImage.m */,
782 B894282C0E6BEA390080B2F5 /* TileProxy.h */, 797 B894282C0E6BEA390080B2F5 /* TileProxy.h */,
@@ -785,6 +800,8 @@ @@ -785,6 +800,8 @@
785 B894282F0E6BEA390080B2F5 /* WebTileImage.m */, 800 B894282F0E6BEA390080B2F5 /* WebTileImage.m */,
786 B8D9B27B0E6D460500EDA368 /* FileTileImage.h */, 801 B8D9B27B0E6D460500EDA368 /* FileTileImage.h */,
787 B8D9B27C0E6D460500EDA368 /* FileTileImage.m */, 802 B8D9B27C0E6D460500EDA368 /* FileTileImage.m */,
  803 + B8A5CB150E764C84005509DE /* TileImageSet.h */,
  804 + B8A5CB160E764C84005509DE /* TileImageSet.m */,
788 ); 805 );
789 name = "Tile Management"; 806 name = "Tile Management";
790 sourceTree = "<group>"; 807 sourceTree = "<group>";
@@ -868,6 +885,10 @@ @@ -868,6 +885,10 @@
868 children = ( 885 children = (
869 B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */, 886 B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */,
870 B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */, 887 B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */,
  888 + B8A5C9200E75A107005509DE /* LayeredTileLoader.h */,
  889 + B8A5C9210E75A107005509DE /* LayeredTileLoader.m */,
  890 + B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */,
  891 + B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */,
871 ); 892 );
872 name = "Core Animation Renderer"; 893 name = "Core Animation Renderer";
873 sourceTree = "<group>"; 894 sourceTree = "<group>";
@@ -899,7 +920,7 @@ @@ -899,7 +920,7 @@
899 B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */, 920 B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */,
900 B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */, 921 B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */,
901 B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */, 922 B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */,
902 - B8D9B2030E6BFA7F00EDA368 /* FileCache.h in Headers */, 923 + B8D9B2030E6BFA7F00EDA368 /* DiskCache.h in Headers */,
903 B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */, 924 B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */,
904 B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */, 925 B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */,
905 B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */, 926 B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */,
@@ -916,6 +937,9 @@ @@ -916,6 +937,9 @@
916 B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */, 937 B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */,
917 B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */, 938 B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */,
918 B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */, 939 B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */,
  940 + B8A5C9220E75A107005509DE /* LayeredTileLoader.h in Headers */,
  941 + B8A5CB170E764C84005509DE /* TileImageSet.h in Headers */,
  942 + B8C6B1290E78C79200C12A12 /* LayerToScreenProjection.h in Headers */,
919 ); 943 );
920 runOnlyForDeploymentPostprocessing = 0; 944 runOnlyForDeploymentPostprocessing = 0;
921 }; 945 };
@@ -1181,7 +1205,7 @@ @@ -1181,7 +1205,7 @@
1181 B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */, 1205 B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */,
1182 B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */, 1206 B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */,
1183 B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */, 1207 B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */,
1184 - B8D9B1F50E6BFA7500EDA368 /* FileCache.m in Sources */, 1208 + B8D9B1F50E6BFA7500EDA368 /* DiskCache.m in Sources */,
1185 B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */, 1209 B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */,
1186 B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */, 1210 B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */,
1187 B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */, 1211 B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */,
@@ -1194,10 +1218,14 @@ @@ -1194,10 +1218,14 @@
1194 B8A51E910E6D7192006AA8E2 /* TileCache.m in Sources */, 1218 B8A51E910E6D7192006AA8E2 /* TileCache.m in Sources */,
1195 B87626CB0E7529BE0024B9C5 /* ScreenProjection.m in Sources */, 1219 B87626CB0E7529BE0024B9C5 /* ScreenProjection.m in Sources */,
1196 B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */, 1220 B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */,
1197 - B87626E90E7562620024B9C5 /* TileImageSet.m in Sources */, 1221 + B87626E90E7562620024B9C5 /* TileLoader.m in Sources */,
1198 B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */, 1222 B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */,
1199 B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */, 1223 B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */,
1200 B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */, 1224 B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */,
  1225 + B8A5C9230E75A107005509DE /* LayeredTileLoader.m in Sources */,
  1226 + B8A5C9BF0E763371005509DE /* Tile.c in Sources */,
  1227 + B8A5CB180E764C84005509DE /* TileImageSet.m in Sources */,
  1228 + B8C6B12A0E78C79200C12A12 /* LayerToScreenProjection.m in Sources */,
1201 ); 1229 );
1202 runOnlyForDeploymentPostprocessing = 0; 1230 runOnlyForDeploymentPostprocessing = 0;
1203 }; 1231 };
@@ -1233,6 +1261,7 @@ @@ -1233,6 +1261,7 @@
1233 "\"$(SRCROOT)/build/Release-iphoneos\"", 1261 "\"$(SRCROOT)/build/Release-iphoneos\"",
1234 ); 1262 );
1235 PRODUCT_NAME = RouteMe; 1263 PRODUCT_NAME = RouteMe;
  1264 + SDKROOT = iphoneos2.1;
1236 }; 1265 };
1237 name = Debug; 1266 name = Debug;
1238 }; 1267 };
@@ -1250,6 +1279,7 @@ @@ -1250,6 +1279,7 @@
1250 "\"$(SRCROOT)/build/Release-iphoneos\"", 1279 "\"$(SRCROOT)/build/Release-iphoneos\"",
1251 ); 1280 );
1252 PRODUCT_NAME = RouteMe; 1281 PRODUCT_NAME = RouteMe;
  1282 + SDKROOT = iphoneos2.1;
1253 }; 1283 };
1254 name = Release; 1284 name = Release;
1255 }; 1285 };
@@ -1290,6 +1320,7 @@ @@ -1290,6 +1320,7 @@
1290 GCC_OPTIMIZATION_LEVEL = 0; 1320 GCC_OPTIMIZATION_LEVEL = 0;
1291 PREBINDING = NO; 1321 PREBINDING = NO;
1292 PRODUCT_NAME = MapView; 1322 PRODUCT_NAME = MapView;
  1323 + SDKROOT = iphoneos2.1;
1293 }; 1324 };
1294 name = Debug; 1325 name = Debug;
1295 }; 1326 };
@@ -1303,6 +1334,7 @@ @@ -1303,6 +1334,7 @@
1303 GCC_ENABLE_FIX_AND_CONTINUE = NO; 1334 GCC_ENABLE_FIX_AND_CONTINUE = NO;
1304 PREBINDING = NO; 1335 PREBINDING = NO;
1305 PRODUCT_NAME = MapView; 1336 PRODUCT_NAME = MapView;
  1337 + SDKROOT = iphoneos2.1;
1306 ZERO_LINK = NO; 1338 ZERO_LINK = NO;
1307 }; 1339 };
1308 name = Release; 1340 name = Release;
@@ -233,6 +233,8 @@ @@ -233,6 +233,8 @@
233 <key>Layout</key> 233 <key>Layout</key>
234 <array> 234 <array>
235 <dict> 235 <dict>
  236 + <key>BecomeActive</key>
  237 + <true/>
236 <key>ContentConfiguration</key> 238 <key>ContentConfiguration</key>
237 <dict> 239 <dict>
238 <key>PBXBottomSmartGroupGIDs</key> 240 <key>PBXBottomSmartGroupGIDs</key>
@@ -258,7 +260,7 @@ @@ -258,7 +260,7 @@
258 <key>PBXSmartGroupTreeModuleColumnWidthsKey</key> 260 <key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
259 <array> 261 <array>
260 <real>22</real> 262 <real>22</real>
261 - <real>244</real> 263 + <real>284</real>
262 </array> 264 </array>
263 <key>PBXSmartGroupTreeModuleColumnsKey_v4</key> 265 <key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
264 <array> 266 <array>
@@ -271,14 +273,16 @@ @@ -271,14 +273,16 @@
271 <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key> 273 <key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
272 <array> 274 <array>
273 <string>29B97314FDCFA39411CA2CEA</string> 275 <string>29B97314FDCFA39411CA2CEA</string>
274 - <string>B894285B0E6BEAE40080B2F5</string>  
275 - <string>B89428520E6BEAC70080B2F5</string>  
276 <string>B894281C0E6BEA390080B2F5</string> 276 <string>B894281C0E6BEA390080B2F5</string>
  277 + <string>B87626EE0E7565350024B9C5</string>
277 <string>B87626CC0E7529CF0024B9C5</string> 278 <string>B87626CC0E7529CF0024B9C5</string>
278 <string>B87626D30E752B640024B9C5</string> 279 <string>B87626D30E752B640024B9C5</string>
279 - <string>B89428300E6BEA390080B2F5</string> 280 + <string>B8A5C8780E757E95005509DE</string>
  281 + <string>B87626D20E752B280024B9C5</string>
280 <string>B89428210E6BEA390080B2F5</string> 282 <string>B89428210E6BEA390080B2F5</string>
281 - <string>19C28FACFE9D520D11CA2CBB</string> 283 + <string>B87626D40E752DF30024B9C5</string>
  284 + <string>B89428300E6BEA390080B2F5</string>
  285 + <string>B894281D0E6BEA390080B2F5</string>
282 <string>1C37FBAC04509CD000000102</string> 286 <string>1C37FBAC04509CD000000102</string>
283 <string>1C37FAAC04509CD000000102</string> 287 <string>1C37FAAC04509CD000000102</string>
284 <string>1C37FABC05509CD000000102</string> 288 <string>1C37FABC05509CD000000102</string>
@@ -286,14 +290,15 @@ @@ -286,14 +290,15 @@
286 <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> 290 <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
287 <array> 291 <array>
288 <array> 292 <array>
289 - <integer>40</integer>  
290 - <integer>37</integer>  
291 - <integer>16</integer> 293 + <integer>20</integer>
  294 + <integer>14</integer>
  295 + <integer>10</integer>
  296 + <integer>6</integer>
292 <integer>0</integer> 297 <integer>0</integer>
293 </array> 298 </array>
294 </array> 299 </array>
295 <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> 300 <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
296 - <string>{{0, 0}, {266, 1064}}</string> 301 + <string>{{0, 0}, {306, 1064}}</string>
297 </dict> 302 </dict>
298 <key>PBXTopSmartGroupGIDs</key> 303 <key>PBXTopSmartGroupGIDs</key>
299 <array/> 304 <array/>
@@ -305,34 +310,32 @@ @@ -305,34 +310,32 @@
305 <key>GeometryConfiguration</key> 310 <key>GeometryConfiguration</key>
306 <dict> 311 <dict>
307 <key>Frame</key> 312 <key>Frame</key>
308 - <string>{{0, 0}, {283, 1082}}</string> 313 + <string>{{0, 0}, {323, 1082}}</string>
309 <key>GroupTreeTableConfiguration</key> 314 <key>GroupTreeTableConfiguration</key>
310 <array> 315 <array>
311 <string>SCMStatusColumn</string> 316 <string>SCMStatusColumn</string>
312 <real>22</real> 317 <real>22</real>
313 <string>MainColumn</string> 318 <string>MainColumn</string>
314 - <real>244</real> 319 + <real>284</real>
315 </array> 320 </array>
316 <key>RubberWindowFrame</key> 321 <key>RubberWindowFrame</key>
317 - <string>7 55 1916 1123 0 0 1920 1178 </string> 322 + <string>6 55 1916 1123 0 0 1920 1178 </string>
318 </dict> 323 </dict>
319 <key>Module</key> 324 <key>Module</key>
320 <string>PBXSmartGroupTreeModule</string> 325 <string>PBXSmartGroupTreeModule</string>
321 <key>Proportion</key> 326 <key>Proportion</key>
322 - <string>283pt</string> 327 + <string>323pt</string>
323 </dict> 328 </dict>
324 <dict> 329 <dict>
325 <key>Dock</key> 330 <key>Dock</key>
326 <array> 331 <array>
327 <dict> 332 <dict>
328 - <key>BecomeActive</key>  
329 - <true/>  
330 <key>ContentConfiguration</key> 333 <key>ContentConfiguration</key>
331 <dict> 334 <dict>
332 <key>PBXProjectModuleGUID</key> 335 <key>PBXProjectModuleGUID</key>
333 <string>1CE0B20306471E060097A5F4</string> 336 <string>1CE0B20306471E060097A5F4</string>
334 <key>PBXProjectModuleLabel</key> 337 <key>PBXProjectModuleLabel</key>
335 - <string>TileImageSet.m</string> 338 + <string>LayerToScreenProjection.m</string>
336 <key>PBXSplitModuleInNavigatorKey</key> 339 <key>PBXSplitModuleInNavigatorKey</key>
337 <dict> 340 <dict>
338 <key>Split0</key> 341 <key>Split0</key>
@@ -340,11 +343,11 @@ @@ -340,11 +343,11 @@
340 <key>PBXProjectModuleGUID</key> 343 <key>PBXProjectModuleGUID</key>
341 <string>1CE0B20406471E060097A5F4</string> 344 <string>1CE0B20406471E060097A5F4</string>
342 <key>PBXProjectModuleLabel</key> 345 <key>PBXProjectModuleLabel</key>
343 - <string>TileImageSet.m</string> 346 + <string>LayerToScreenProjection.m</string>
344 <key>_historyCapacity</key> 347 <key>_historyCapacity</key>
345 <integer>0</integer> 348 <integer>0</integer>
346 <key>bookmark</key> 349 <key>bookmark</key>
347 - <string>B8A5C8760E757DDF005509DE</string> 350 + <string>B848462A0E80B0A6005A7BC9</string>
348 <key>history</key> 351 <key>history</key>
349 <array> 352 <array>
350 <string>B89429560E6BEB760080B2F5</string> 353 <string>B89429560E6BEB760080B2F5</string>
@@ -370,55 +373,70 @@ @@ -370,55 +373,70 @@
370 <string>B8D9B2170E6BFBF700EDA368</string> 373 <string>B8D9B2170E6BFBF700EDA368</string>
371 <string>B8D9B2450E6BFE0C00EDA368</string> 374 <string>B8D9B2450E6BFE0C00EDA368</string>
372 <string>B8D9B2750E6D152500EDA368</string> 375 <string>B8D9B2750E6D152500EDA368</string>
373 - <string>B8A51E9F0E6D73CC006AA8E2</string>  
374 - <string>B8A51EAA0E6D73CC006AA8E2</string>  
375 - <string>B8A51FAE0E6D7AAA006AA8E2</string>  
376 - <string>B8A51FC30E6D7B5E006AA8E2</string>  
377 - <string>B8A51FD90E6D7BEB006AA8E2</string>  
378 - <string>B8A51FE70E6D8604006AA8E2</string>  
379 <string>B8A51FE90E6D8604006AA8E2</string> 376 <string>B8A51FE90E6D8604006AA8E2</string>
380 - <string>B8A51FEE0E6D8604006AA8E2</string>  
381 - <string>B8A5200F0E6D8F42006AA8E2</string>  
382 <string>B8A520220E6D9456006AA8E2</string> 377 <string>B8A520220E6D9456006AA8E2</string>
383 <string>B8A520230E6D9456006AA8E2</string> 378 <string>B8A520230E6D9456006AA8E2</string>
384 - <string>B8A520700E6E39AD006AA8E2</string>  
385 - <string>B8A520D90E6E4ED0006AA8E2</string>  
386 - <string>B8A520DA0E6E4ED0006AA8E2</string>  
387 <string>B8A521F50E6E74AB006AA8E2</string> 379 <string>B8A521F50E6E74AB006AA8E2</string>
388 <string>B8A522610E6E850D006AA8E2</string> 380 <string>B8A522610E6E850D006AA8E2</string>
389 <string>B8A522620E6E850D006AA8E2</string> 381 <string>B8A522620E6E850D006AA8E2</string>
390 <string>B8A523400E6E86CE006AA8E2</string> 382 <string>B8A523400E6E86CE006AA8E2</string>
391 <string>B87627050E7566990024B9C5</string> 383 <string>B87627050E7566990024B9C5</string>
392 - <string>B87627060E7566990024B9C5</string>  
393 - <string>B87627070E7566990024B9C5</string>  
394 - <string>B876270A0E7566990024B9C5</string>  
395 - <string>B876270C0E7566990024B9C5</string>  
396 - <string>B876270D0E7566990024B9C5</string>  
397 - <string>B87627170E7566990024B9C5</string>  
398 - <string>B87627190E7566990024B9C5</string>  
399 <string>B876283B0E756CAE0024B9C5</string> 384 <string>B876283B0E756CAE0024B9C5</string>
400 - <string>B876283E0E756CAE0024B9C5</string>  
401 - <string>B87628400E756CAE0024B9C5</string>  
402 <string>B8A5C7690E756F6B005509DE</string> 385 <string>B8A5C7690E756F6B005509DE</string>
403 <string>B8A5C76A0E756F6B005509DE</string> 386 <string>B8A5C76A0E756F6B005509DE</string>
404 <string>B8A5C76B0E756F6B005509DE</string> 387 <string>B8A5C76B0E756F6B005509DE</string>
405 <string>B8A5C76C0E756F6B005509DE</string> 388 <string>B8A5C76C0E756F6B005509DE</string>
406 <string>B8A5C76D0E756F6B005509DE</string> 389 <string>B8A5C76D0E756F6B005509DE</string>
407 - <string>B8A5C78B0E757042005509DE</string>  
408 <string>B8A5C78C0E757042005509DE</string> 390 <string>B8A5C78C0E757042005509DE</string>
409 - <string>B8A5C7A80E757175005509DE</string>  
410 - <string>B8A5C7CD0E75745C005509DE</string>  
411 - <string>B8A5C7CE0E75745C005509DE</string>  
412 - <string>B8A5C7D00E75745C005509DE</string>  
413 - <string>B8A5C7D20E75745C005509DE</string>  
414 - <string>B8A5C81A0E757738005509DE</string>  
415 - <string>B8A5C81B0E757738005509DE</string>  
416 - <string>B8A5C8510E757B48005509DE</string>  
417 - <string>B8A5C8520E757B48005509DE</string>  
418 - <string>B8A5C8530E757B48005509DE</string>  
419 - <string>B8A5C85F0E757BC9005509DE</string>  
420 - <string>B8A5C8680E757D29005509DE</string>  
421 - <string>B8A5C8690E757D29005509DE</string> 391 + <string>B8A5C92A0E762E71005509DE</string>
  392 + <string>B8A5C92C0E762E71005509DE</string>
  393 + <string>B8A5C9C80E763852005509DE</string>
  394 + <string>B8A5CA040E763FD8005509DE</string>
  395 + <string>B8A5CA060E763FD8005509DE</string>
  396 + <string>B8A5CBB20E7656EE005509DE</string>
  397 + <string>B8A5CBB30E7656EE005509DE</string>
  398 + <string>B8A5CBCD0E765D9F005509DE</string>
  399 + <string>B8A5CC440E765F27005509DE</string>
  400 + <string>B8A5CC610E76620C005509DE</string>
  401 + <string>B8A5CC640E76620C005509DE</string>
  402 + <string>B8A5CCC10E7666C6005509DE</string>
  403 + <string>B8A5CD390E767286005509DE</string>
  404 + <string>B8A5CD770E7677D2005509DE</string>
  405 + <string>B80AED7E0E7775110031DF63</string>
  406 + <string>B8C6AF650E77A6DB00C12A12</string>
  407 + <string>B8C6AF9E0E77AAD400C12A12</string>
  408 + <string>B8C6AFB00E77AC3D00C12A12</string>
  409 + <string>B8C6AFB10E77AC3D00C12A12</string>
  410 + <string>B8C6B0110E77B94900C12A12</string>
  411 + <string>B8C6B07F0E77C10D00C12A12</string>
  412 + <string>B8C6B08D0E77C25B00C12A12</string>
  413 + <string>B8C6B09C0E77C2C100C12A12</string>
  414 + <string>B8C6B09D0E77C2C100C12A12</string>
  415 + <string>B87F17A00E7B7CD000C90CBC</string>
  416 + <string>B87F17A50E7B7CD000C90CBC</string>
  417 + <string>B83ADFC40E7E2DAA00BB0D25</string>
  418 + <string>B83ADFF70E7E355D00BB0D25</string>
  419 + <string>B83ADFFC0E7E355D00BB0D25</string>
  420 + <string>B83AE0420E7E362600BB0D25</string>
  421 + <string>B83AE0800E7EE70000BB0D25</string>
  422 + <string>B83AE0E00E7F5E6A00BB0D25</string>
  423 + <string>B83AE10F0E7F612500BB0D25</string>
  424 + <string>B83AE12A0E7F633E00BB0D25</string>
  425 + <string>B83AE1440E7F6B7500BB0D25</string>
  426 + <string>B83AE1450E7F6B7500BB0D25</string>
  427 + <string>B84845BD0E80A88C005A7BC9</string>
  428 + <string>B84845EE0E80AFCB005A7BC9</string>
  429 + <string>B84845EF0E80AFCB005A7BC9</string>
  430 + <string>B84845F10E80AFCB005A7BC9</string>
  431 + <string>B84845F20E80AFCB005A7BC9</string>
  432 + <string>B84845F30E80AFCB005A7BC9</string>
  433 + <string>B84845F40E80AFCB005A7BC9</string>
  434 + <string>B84846130E80AFFC005A7BC9</string>
  435 + <string>B848461A0E80B044005A7BC9</string>
  436 + <string>B848461B0E80B044005A7BC9</string>
  437 + <string>B84846240E80B0A6005A7BC9</string>
  438 + <string>B84846250E80B0A6005A7BC9</string>
  439 + <string>B84846260E80B0A6005A7BC9</string>
422 </array> 440 </array>
423 <key>prevStack</key> 441 <key>prevStack</key>
424 <array> 442 <array>
@@ -472,7 +490,6 @@ @@ -472,7 +490,6 @@
472 <string>B8A51E550E6D5F38006AA8E2</string> 490 <string>B8A51E550E6D5F38006AA8E2</string>
473 <string>B8A51E580E6D5F38006AA8E2</string> 491 <string>B8A51E580E6D5F38006AA8E2</string>
474 <string>B8A51E590E6D5F38006AA8E2</string> 492 <string>B8A51E590E6D5F38006AA8E2</string>
475 - <string>B8A51E6F0E6D5F7D006AA8E2</string>  
476 <string>B8A51E830E6D6F5D006AA8E2</string> 493 <string>B8A51E830E6D6F5D006AA8E2</string>
477 <string>B8A51EC00E6D73CC006AA8E2</string> 494 <string>B8A51EC00E6D73CC006AA8E2</string>
478 <string>B8A51EC10E6D73CC006AA8E2</string> 495 <string>B8A51EC10E6D73CC006AA8E2</string>
@@ -488,102 +505,54 @@ @@ -488,102 +505,54 @@
488 <string>B876272B0E7566990024B9C5</string> 505 <string>B876272B0E7566990024B9C5</string>
489 <string>B87627510E7566990024B9C5</string> 506 <string>B87627510E7566990024B9C5</string>
490 <string>B87627520E7566990024B9C5</string> 507 <string>B87627520E7566990024B9C5</string>
491 - <string>B87628090E7566990024B9C5</string>  
492 <string>B876280C0E7566990024B9C5</string> 508 <string>B876280C0E7566990024B9C5</string>
493 <string>B87628770E756CAE0024B9C5</string> 509 <string>B87628770E756CAE0024B9C5</string>
494 - <string>B8A5C76E0E756F6B005509DE</string>  
495 <string>B8A5C76F0E756F6B005509DE</string> 510 <string>B8A5C76F0E756F6B005509DE</string>
496 - <string>B8A5C7700E756F6B005509DE</string>  
497 - <string>B8A5C7710E756F6B005509DE</string>  
498 - <string>B8A5C7720E756F6B005509DE</string>  
499 - <string>B8A5C7730E756F6B005509DE</string>  
500 - <string>B8A5C7740E756F6B005509DE</string>  
501 - <string>B8A5C77D0E756FA7005509DE</string>  
502 - <string>B8A5C78E0E757042005509DE</string>  
503 - <string>B8A5C78F0E757042005509DE</string>  
504 - <string>B8A5C7980E7570A0005509DE</string>  
505 - <string>B8A5C7990E7570A0005509DE</string>  
506 - <string>B8A5C79E0E7570BB005509DE</string>  
507 - <string>B8A5C79F0E7570BB005509DE</string>  
508 - <string>B8A5C7AB0E757175005509DE</string>  
509 - <string>B8A5C7AC0E757175005509DE</string>  
510 - <string>B8A5C7AD0E757175005509DE</string>  
511 - <string>B8A5C7AE0E757175005509DE</string>  
512 - <string>B8A5C7AF0E757175005509DE</string>  
513 - <string>B8A5C7BA0E75726C005509DE</string>  
514 - <string>B8A5C7BB0E75726C005509DE</string>  
515 - <string>B8A5C7BC0E75726C005509DE</string>  
516 - <string>B8A5C7BD0E75726C005509DE</string>  
517 - <string>B8A5C7BE0E75726C005509DE</string>  
518 - <string>B8A5C7BF0E75726C005509DE</string>  
519 - <string>B8A5C7C00E75726C005509DE</string>  
520 - <string>B8A5C7C10E75726C005509DE</string>  
521 - <string>B8A5C7C20E75726C005509DE</string>  
522 - <string>B8A5C7D50E75745C005509DE</string>  
523 - <string>B8A5C7D60E75745C005509DE</string>  
524 - <string>B8A5C7D70E75745C005509DE</string>  
525 - <string>B8A5C7D80E75745C005509DE</string>  
526 - <string>B8A5C7D90E75745C005509DE</string>  
527 - <string>B8A5C7DA0E75745C005509DE</string>  
528 - <string>B8A5C7DB0E75745C005509DE</string>  
529 - <string>B8A5C7DC0E75745C005509DE</string>  
530 - <string>B8A5C7DD0E75745C005509DE</string>  
531 - <string>B8A5C7DE0E75745C005509DE</string>  
532 - <string>B8A5C7DF0E75745C005509DE</string>  
533 - <string>B8A5C7E00E75745C005509DE</string>  
534 - <string>B8A5C7E10E75745C005509DE</string>  
535 - <string>B8A5C7E20E75745C005509DE</string>  
536 - <string>B8A5C7E30E75745C005509DE</string>  
537 - <string>B8A5C7E40E75745C005509DE</string>  
538 - <string>B8A5C7E50E75745C005509DE</string>  
539 - <string>B8A5C7E60E75745C005509DE</string>  
540 - <string>B8A5C7E70E75745C005509DE</string>  
541 - <string>B8A5C7E80E75745C005509DE</string>  
542 - <string>B8A5C7E90E75745C005509DE</string>  
543 - <string>B8A5C7EA0E75745C005509DE</string>  
544 - <string>B8A5C7EB0E75745C005509DE</string>  
545 - <string>B8A5C7EC0E75745C005509DE</string>  
546 - <string>B8A5C7ED0E75745C005509DE</string>  
547 - <string>B8A5C7EE0E75745C005509DE</string>  
548 - <string>B8A5C7EF0E75745C005509DE</string>  
549 - <string>B8A5C7F00E75745C005509DE</string>  
550 - <string>B8A5C7F10E75745C005509DE</string>  
551 - <string>B8A5C7F20E75745C005509DE</string>  
552 - <string>B8A5C7F30E75745C005509DE</string>  
553 - <string>B8A5C7F40E75745C005509DE</string>  
554 - <string>B8A5C7F50E75745C005509DE</string>  
555 - <string>B8A5C7F60E75745C005509DE</string>  
556 - <string>B8A5C8120E7575BA005509DE</string>  
557 - <string>B8A5C81D0E757738005509DE</string>  
558 - <string>B8A5C81E0E757738005509DE</string>  
559 - <string>B8A5C81F0E757738005509DE</string>  
560 - <string>B8A5C8200E757738005509DE</string>  
561 - <string>B8A5C8210E757738005509DE</string>  
562 - <string>B8A5C8220E757738005509DE</string>  
563 - <string>B8A5C8230E757738005509DE</string>  
564 - <string>B8A5C8240E757738005509DE</string>  
565 - <string>B8A5C8250E757738005509DE</string>  
566 - <string>B8A5C8260E757738005509DE</string>  
567 - <string>B8A5C8270E757738005509DE</string>  
568 - <string>B8A5C8280E757738005509DE</string>  
569 - <string>B8A5C8290E757738005509DE</string>  
570 - <string>B8A5C82A0E757738005509DE</string>  
571 - <string>B8A5C83C0E757986005509DE</string>  
572 - <string>B8A5C83D0E757986005509DE</string>  
573 - <string>B8A5C83E0E757986005509DE</string>  
574 - <string>B8A5C83F0E757986005509DE</string>  
575 - <string>B8A5C8480E757A06005509DE</string>  
576 - <string>B8A5C84D0E757A20005509DE</string>  
577 - <string>B8A5C8560E757B48005509DE</string>  
578 - <string>B8A5C8570E757B48005509DE</string>  
579 - <string>B8A5C8580E757B48005509DE</string>  
580 - <string>B8A5C8590E757B48005509DE</string>  
581 - <string>B8A5C85A0E757B48005509DE</string>  
582 - <string>B8A5C8610E757BC9005509DE</string>  
583 - <string>B8A5C86A0E757D29005509DE</string>  
584 - <string>B8A5C86B0E757D29005509DE</string>  
585 - <string>B8A5C86C0E757D29005509DE</string>  
586 - <string>B8A5C86D0E757D29005509DE</string> 511 + <string>B8A5C8A80E7584C5005509DE</string>
  512 + <string>B8A5C8D10E7584C5005509DE</string>
  513 + <string>B8A5C9540E762E71005509DE</string>
  514 + <string>B8A5C9630E762E71005509DE</string>
  515 + <string>B8A5C9DC0E763852005509DE</string>
  516 + <string>B8A5C9F00E763852005509DE</string>
  517 + <string>B8A5CA200E763FD8005509DE</string>
  518 + <string>B8A5CA2B0E763FD8005509DE</string>
  519 + <string>B8A5CB350E765661005509DE</string>
  520 + <string>B8A5CB360E765661005509DE</string>
  521 + <string>B8C6AEB30E77997E00C12A12</string>
  522 + <string>B8C6B0E80E77C7DF00C12A12</string>
  523 + <string>B8C6B1360E790C5C00C12A12</string>
  524 + <string>B8C6B13A0E790C5C00C12A12</string>
  525 + <string>B8F728A90E7B90F8003277F4</string>
  526 + <string>B84845BF0E80A88C005A7BC9</string>
  527 + <string>B84845F70E80AFCB005A7BC9</string>
  528 + <string>B84845F80E80AFCB005A7BC9</string>
  529 + <string>B84845F90E80AFCB005A7BC9</string>
  530 + <string>B84845FA0E80AFCB005A7BC9</string>
  531 + <string>B84845FB0E80AFCB005A7BC9</string>
  532 + <string>B84845FC0E80AFCB005A7BC9</string>
  533 + <string>B84845FD0E80AFCB005A7BC9</string>
  534 + <string>B84845FE0E80AFCB005A7BC9</string>
  535 + <string>B84845FF0E80AFCB005A7BC9</string>
  536 + <string>B84846000E80AFCB005A7BC9</string>
  537 + <string>B84846010E80AFCB005A7BC9</string>
  538 + <string>B84846020E80AFCB005A7BC9</string>
  539 + <string>B84846030E80AFCB005A7BC9</string>
  540 + <string>B84846040E80AFCB005A7BC9</string>
  541 + <string>B84846050E80AFCB005A7BC9</string>
  542 + <string>B84846060E80AFCB005A7BC9</string>
  543 + <string>B84846070E80AFCB005A7BC9</string>
  544 + <string>B84846080E80AFCB005A7BC9</string>
  545 + <string>B84846090E80AFCB005A7BC9</string>
  546 + <string>B848460A0E80AFCB005A7BC9</string>
  547 + <string>B848460B0E80AFCB005A7BC9</string>
  548 + <string>B848460C0E80AFCB005A7BC9</string>
  549 + <string>B848460D0E80AFCB005A7BC9</string>
  550 + <string>B84846150E80AFFC005A7BC9</string>
  551 + <string>B848461D0E80B044005A7BC9</string>
  552 + <string>B848461E0E80B044005A7BC9</string>
  553 + <string>B84846270E80B0A6005A7BC9</string>
  554 + <string>B84846280E80B0A6005A7BC9</string>
  555 + <string>B84846290E80B0A6005A7BC9</string>
587 </array> 556 </array>
588 </dict> 557 </dict>
589 <key>SplitCount</key> 558 <key>SplitCount</key>
@@ -595,14 +564,14 @@ @@ -595,14 +564,14 @@
595 <key>GeometryConfiguration</key> 564 <key>GeometryConfiguration</key>
596 <dict> 565 <dict>
597 <key>Frame</key> 566 <key>Frame</key>
598 - <string>{{0, 0}, {1628, 965}}</string> 567 + <string>{{0, 0}, {1588, 950}}</string>
599 <key>RubberWindowFrame</key> 568 <key>RubberWindowFrame</key>
600 - <string>7 55 1916 1123 0 0 1920 1178 </string> 569 + <string>6 55 1916 1123 0 0 1920 1178 </string>
601 </dict> 570 </dict>
602 <key>Module</key> 571 <key>Module</key>
603 <string>PBXNavigatorGroup</string> 572 <string>PBXNavigatorGroup</string>
604 <key>Proportion</key> 573 <key>Proportion</key>
605 - <string>965pt</string> 574 + <string>950pt</string>
606 </dict> 575 </dict>
607 <dict> 576 <dict>
608 <key>ContentConfiguration</key> 577 <key>ContentConfiguration</key>
@@ -615,18 +584,18 @@ @@ -615,18 +584,18 @@
615 <key>GeometryConfiguration</key> 584 <key>GeometryConfiguration</key>
616 <dict> 585 <dict>
617 <key>Frame</key> 586 <key>Frame</key>
618 - <string>{{0, 970}, {1628, 112}}</string> 587 + <string>{{0, 955}, {1588, 127}}</string>
619 <key>RubberWindowFrame</key> 588 <key>RubberWindowFrame</key>
620 - <string>7 55 1916 1123 0 0 1920 1178 </string> 589 + <string>6 55 1916 1123 0 0 1920 1178 </string>
621 </dict> 590 </dict>
622 <key>Module</key> 591 <key>Module</key>
623 <string>XCDetailModule</string> 592 <string>XCDetailModule</string>
624 <key>Proportion</key> 593 <key>Proportion</key>
625 - <string>112pt</string> 594 + <string>127pt</string>
626 </dict> 595 </dict>
627 </array> 596 </array>
628 <key>Proportion</key> 597 <key>Proportion</key>
629 - <string>1628pt</string> 598 + <string>1588pt</string>
630 </dict> 599 </dict>
631 </array> 600 </array>
632 <key>Name</key> 601 <key>Name</key>
@@ -641,9 +610,9 @@ @@ -641,9 +610,9 @@
641 </array> 610 </array>
642 <key>TableOfContents</key> 611 <key>TableOfContents</key>
643 <array> 612 <array>
644 - <string>B8A5C73A0E756E6E005509DE</string> 613 + <string>B848458F0E7F7E9A005A7BC9</string>
645 <string>1CE0B1FE06471DED0097A5F4</string> 614 <string>1CE0B1FE06471DED0097A5F4</string>
646 - <string>B8A5C73B0E756E6E005509DE</string> 615 + <string>B84845900E7F7E9A005A7BC9</string>
647 <string>1CE0B20306471E060097A5F4</string> 616 <string>1CE0B20306471E060097A5F4</string>
648 <string>1CE0B20506471E060097A5F4</string> 617 <string>1CE0B20506471E060097A5F4</string>
649 </array> 618 </array>
@@ -777,15 +746,17 @@ @@ -777,15 +746,17 @@
777 <integer>5</integer> 746 <integer>5</integer>
778 <key>WindowOrderList</key> 747 <key>WindowOrderList</key>
779 <array> 748 <array>
780 - <string>B8A5C74B0E756E98005509DE</string>  
781 - <string>B8A5C7450E756E6E005509DE</string>  
782 - <string>1CD10A99069EF8BA00B06720</string> 749 + <string>B8A523490E6E86CE006AA8E2</string>
  750 + <string>1C530D57069F1CE1000CFCEE</string>
  751 + <string>B84845C70E80A98B005A7BC9</string>
  752 + <string>B84845C40E80A88C005A7BC9</string>
783 <string>B89426BA0E6BE9980080B2F5</string> 753 <string>B89426BA0E6BE9980080B2F5</string>
784 - <string>/Users/sineltor/src/catchme/Project/RouteMe/RouteMe.xcodeproj</string> 754 + <string>1CD10A99069EF8BA00B06720</string>
785 <string>1C78EAAD065D492600B07095</string> 755 <string>1C78EAAD065D492600B07095</string>
  756 + <string>/Users/sineltor/src/catchme/Project/RouteMe/RouteMe.xcodeproj</string>
786 </array> 757 </array>
787 <key>WindowString</key> 758 <key>WindowString</key>
788 - <string>7 55 1916 1123 0 0 1920 1178 </string> 759 + <string>6 55 1916 1123 0 0 1920 1178 </string>
789 <key>WindowToolsV3</key> 760 <key>WindowToolsV3</key>
790 <array> 761 <array>
791 <dict> 762 <dict>
@@ -801,14 +772,12 @@ @@ -801,14 +772,12 @@
801 <key>Dock</key> 772 <key>Dock</key>
802 <array> 773 <array>
803 <dict> 774 <dict>
804 - <key>BecomeActive</key>  
805 - <true/>  
806 <key>ContentConfiguration</key> 775 <key>ContentConfiguration</key>
807 <dict> 776 <dict>
808 <key>PBXProjectModuleGUID</key> 777 <key>PBXProjectModuleGUID</key>
809 <string>1CD0528F0623707200166675</string> 778 <string>1CD0528F0623707200166675</string>
810 <key>PBXProjectModuleLabel</key> 779 <key>PBXProjectModuleLabel</key>
811 - <string>ScreenProjection.h</string> 780 + <string></string>
812 <key>StatusBarVisibility</key> 781 <key>StatusBarVisibility</key>
813 <true/> 782 <true/>
814 </dict> 783 </dict>
@@ -817,7 +786,7 @@ @@ -817,7 +786,7 @@
817 <key>Frame</key> 786 <key>Frame</key>
818 <string>{{0, 0}, {896, 361}}</string> 787 <string>{{0, 0}, {896, 361}}</string>
819 <key>RubberWindowFrame</key> 788 <key>RubberWindowFrame</key>
820 - <string>2052 415 896 739 1920 300 1440 900 </string> 789 + <string>2377 373 896 739 1920 300 1440 900 </string>
821 </dict> 790 </dict>
822 <key>Module</key> 791 <key>Module</key>
823 <string>PBXNavigatorGroup</string> 792 <string>PBXNavigatorGroup</string>
@@ -841,7 +810,7 @@ @@ -841,7 +810,7 @@
841 <key>Frame</key> 810 <key>Frame</key>
842 <string>{{0, 366}, {896, 332}}</string> 811 <string>{{0, 366}, {896, 332}}</string>
843 <key>RubberWindowFrame</key> 812 <key>RubberWindowFrame</key>
844 - <string>2052 415 896 739 1920 300 1440 900 </string> 813 + <string>2377 373 896 739 1920 300 1440 900 </string>
845 </dict> 814 </dict>
846 <key>Module</key> 815 <key>Module</key>
847 <string>PBXBuildResultsModule</string> 816 <string>PBXBuildResultsModule</string>
@@ -864,18 +833,18 @@ @@ -864,18 +833,18 @@
864 <key>TableOfContents</key> 833 <key>TableOfContents</key>
865 <array> 834 <array>
866 <string>B89426BA0E6BE9980080B2F5</string> 835 <string>B89426BA0E6BE9980080B2F5</string>
867 - <string>B8A5C73C0E756E6E005509DE</string> 836 + <string>B84845C10E80A88C005A7BC9</string>
868 <string>1CD0528F0623707200166675</string> 837 <string>1CD0528F0623707200166675</string>
869 <string>XCMainBuildResultsModuleGUID</string> 838 <string>XCMainBuildResultsModuleGUID</string>
870 </array> 839 </array>
871 <key>ToolbarConfiguration</key> 840 <key>ToolbarConfiguration</key>
872 <string>xcode.toolbar.config.buildV3</string> 841 <string>xcode.toolbar.config.buildV3</string>
873 <key>WindowString</key> 842 <key>WindowString</key>
874 - <string>2052 415 896 739 1920 300 1440 900 </string> 843 + <string>2377 373 896 739 1920 300 1440 900 </string>
875 <key>WindowToolGUID</key> 844 <key>WindowToolGUID</key>
876 <string>B89426BA0E6BE9980080B2F5</string> 845 <string>B89426BA0E6BE9980080B2F5</string>
877 <key>WindowToolIsVisible</key> 846 <key>WindowToolIsVisible</key>
878 - <true/> 847 + <false/>
879 </dict> 848 </dict>
880 <dict> 849 <dict>
881 <key>FirstTimeWindowDisplayed</key> 850 <key>FirstTimeWindowDisplayed</key>
@@ -906,8 +875,8 @@ @@ -906,8 +875,8 @@
906 <string>yes</string> 875 <string>yes</string>
907 <key>sizes</key> 876 <key>sizes</key>
908 <array> 877 <array>
909 - <string>{{0, 0}, {871, 577}}</string>  
910 - <string>{{871, 0}, {1045, 577}}</string> 878 + <string>{{0, 0}, {870, 497}}</string>
  879 + <string>{{870, 0}, {1046, 497}}</string>
911 </array> 880 </array>
912 </dict> 881 </dict>
913 <key>VerticalSplitView</key> 882 <key>VerticalSplitView</key>
@@ -922,8 +891,8 @@ @@ -922,8 +891,8 @@
922 <string>yes</string> 891 <string>yes</string>
923 <key>sizes</key> 892 <key>sizes</key>
924 <array> 893 <array>
925 - <string>{{0, 0}, {1916, 577}}</string>  
926 - <string>{{0, 577}, {1916, 504}}</string> 894 + <string>{{0, 0}, {1916, 497}}</string>
  895 + <string>{{0, 497}, {1916, 434}}</string>
927 </array> 896 </array>
928 </dict> 897 </dict>
929 </dict> 898 </dict>
@@ -943,7 +912,7 @@ @@ -943,7 +912,7 @@
943 <key>DebugSTDIOWindowFrame</key> 912 <key>DebugSTDIOWindowFrame</key>
944 <string>{{200, 200}, {500, 300}}</string> 913 <string>{{200, 200}, {500, 300}}</string>
945 <key>Frame</key> 914 <key>Frame</key>
946 - <string>{{0, 0}, {1916, 1081}}</string> 915 + <string>{{0, 0}, {1916, 931}}</string>
947 <key>PBXDebugSessionStackFrameViewKey</key> 916 <key>PBXDebugSessionStackFrameViewKey</key>
948 <dict> 917 <dict>
949 <key>DebugVariablesTableConfiguration</key> 918 <key>DebugVariablesTableConfiguration</key>
@@ -953,24 +922,24 @@ @@ -953,24 +922,24 @@
953 <string>Value</string> 922 <string>Value</string>
954 <real>85</real> 923 <real>85</real>
955 <string>Summary</string> 924 <string>Summary</string>
956 - <real>690</real> 925 + <real>691</real>
957 </array> 926 </array>
958 <key>Frame</key> 927 <key>Frame</key>
959 - <string>{{871, 0}, {1045, 577}}</string> 928 + <string>{{870, 0}, {1046, 497}}</string>
960 <key>RubberWindowFrame</key> 929 <key>RubberWindowFrame</key>
961 - <string>4 56 1916 1122 0 0 1920 1178 </string> 930 + <string>396 206 1916 972 0 0 1920 1178 </string>
962 </dict> 931 </dict>
963 <key>RubberWindowFrame</key> 932 <key>RubberWindowFrame</key>
964 - <string>4 56 1916 1122 0 0 1920 1178 </string> 933 + <string>396 206 1916 972 0 0 1920 1178 </string>
965 </dict> 934 </dict>
966 <key>Module</key> 935 <key>Module</key>
967 <string>PBXDebugSessionModule</string> 936 <string>PBXDebugSessionModule</string>
968 <key>Proportion</key> 937 <key>Proportion</key>
969 - <string>1081pt</string> 938 + <string>931pt</string>
970 </dict> 939 </dict>
971 </array> 940 </array>
972 <key>Proportion</key> 941 <key>Proportion</key>
973 - <string>1081pt</string> 942 + <string>931pt</string>
974 </dict> 943 </dict>
975 </array> 944 </array>
976 <key>Name</key> 945 <key>Name</key>
@@ -984,26 +953,30 @@ @@ -984,26 +953,30 @@
984 <key>TableOfContents</key> 953 <key>TableOfContents</key>
985 <array> 954 <array>
986 <string>1CD10A99069EF8BA00B06720</string> 955 <string>1CD10A99069EF8BA00B06720</string>
987 - <string>B8A5C73D0E756E6E005509DE</string> 956 + <string>B84845910E7F7E9A005A7BC9</string>
988 <string>1C162984064C10D400B95A72</string> 957 <string>1C162984064C10D400B95A72</string>
989 - <string>B8A5C73E0E756E6E005509DE</string>  
990 - <string>B8A5C73F0E756E6E005509DE</string>  
991 - <string>B8A5C7400E756E6E005509DE</string>  
992 - <string>B8A5C7410E756E6E005509DE</string>  
993 - <string>B8A5C7420E756E6E005509DE</string> 958 + <string>B84845920E7F7E9A005A7BC9</string>
  959 + <string>B84845930E7F7E9A005A7BC9</string>
  960 + <string>B84845940E7F7E9A005A7BC9</string>
  961 + <string>B84845950E7F7E9A005A7BC9</string>
  962 + <string>B84845960E7F7E9A005A7BC9</string>
994 </array> 963 </array>
995 <key>ToolbarConfiguration</key> 964 <key>ToolbarConfiguration</key>
996 <string>xcode.toolbar.config.debugV3</string> 965 <string>xcode.toolbar.config.debugV3</string>
997 <key>WindowString</key> 966 <key>WindowString</key>
998 - <string>4 56 1916 1122 0 0 1920 1178 </string> 967 + <string>396 206 1916 972 0 0 1920 1178 </string>
999 <key>WindowToolGUID</key> 968 <key>WindowToolGUID</key>
1000 <string>1CD10A99069EF8BA00B06720</string> 969 <string>1CD10A99069EF8BA00B06720</string>
1001 <key>WindowToolIsVisible</key> 970 <key>WindowToolIsVisible</key>
1002 - <false/> 971 + <true/>
1003 </dict> 972 </dict>
1004 <dict> 973 <dict>
  974 + <key>FirstTimeWindowDisplayed</key>
  975 + <false/>
1005 <key>Identifier</key> 976 <key>Identifier</key>
1006 <string>windowTool.find</string> 977 <string>windowTool.find</string>
  978 + <key>IsVertical</key>
  979 + <true/>
1007 <key>Layout</key> 980 <key>Layout</key>
1008 <array> 981 <array>
1009 <dict> 982 <dict>
@@ -1013,44 +986,34 @@ @@ -1013,44 +986,34 @@
1013 <key>Dock</key> 986 <key>Dock</key>
1014 <array> 987 <array>
1015 <dict> 988 <dict>
  989 + <key>BecomeActive</key>
  990 + <true/>
1016 <key>ContentConfiguration</key> 991 <key>ContentConfiguration</key>
1017 <dict> 992 <dict>
1018 <key>PBXProjectModuleGUID</key> 993 <key>PBXProjectModuleGUID</key>
1019 <string>1CDD528C0622207200134675</string> 994 <string>1CDD528C0622207200134675</string>
1020 <key>PBXProjectModuleLabel</key> 995 <key>PBXProjectModuleLabel</key>
1021 - <string>&lt;No Editor&gt;</string>  
1022 - <key>PBXSplitModuleInNavigatorKey</key>  
1023 - <dict>  
1024 - <key>Split0</key>  
1025 - <dict>  
1026 - <key>PBXProjectModuleGUID</key>  
1027 - <string>1CD0528D0623707200166675</string>  
1028 - </dict>  
1029 - <key>SplitCount</key>  
1030 - <string>1</string>  
1031 - </dict> 996 + <string>TiledLayerController.m</string>
1032 <key>StatusBarVisibility</key> 997 <key>StatusBarVisibility</key>
1033 - <integer>1</integer> 998 + <true/>
1034 </dict> 999 </dict>
1035 <key>GeometryConfiguration</key> 1000 <key>GeometryConfiguration</key>
1036 <dict> 1001 <dict>
1037 <key>Frame</key> 1002 <key>Frame</key>
1038 - <string>{{0, 0}, {781, 167}}</string> 1003 + <string>{{0, 0}, {971, 746}}</string>
1039 <key>RubberWindowFrame</key> 1004 <key>RubberWindowFrame</key>
1040 - <string>62 385 781 470 0 0 1440 878 </string> 1005 + <string>897 31 971 1085 0 0 1920 1178 </string>
1041 </dict> 1006 </dict>
1042 <key>Module</key> 1007 <key>Module</key>
1043 <string>PBXNavigatorGroup</string> 1008 <string>PBXNavigatorGroup</string>
1044 <key>Proportion</key> 1009 <key>Proportion</key>
1045 - <string>781pt</string> 1010 + <string>971pt</string>
1046 </dict> 1011 </dict>
1047 </array> 1012 </array>
1048 <key>Proportion</key> 1013 <key>Proportion</key>
1049 - <string>50%</string> 1014 + <string>746pt</string>
1050 </dict> 1015 </dict>
1051 <dict> 1016 <dict>
1052 - <key>BecomeActive</key>  
1053 - <integer>1</integer>  
1054 <key>ContentConfiguration</key> 1017 <key>ContentConfiguration</key>
1055 <dict> 1018 <dict>
1056 <key>PBXProjectModuleGUID</key> 1019 <key>PBXProjectModuleGUID</key>
@@ -1061,18 +1024,18 @@ @@ -1061,18 +1024,18 @@
1061 <key>GeometryConfiguration</key> 1024 <key>GeometryConfiguration</key>
1062 <dict> 1025 <dict>
1063 <key>Frame</key> 1026 <key>Frame</key>
1064 - <string>{{8, 0}, {773, 254}}</string> 1027 + <string>{{0, 751}, {971, 293}}</string>
1065 <key>RubberWindowFrame</key> 1028 <key>RubberWindowFrame</key>
1066 - <string>62 385 781 470 0 0 1440 878 </string> 1029 + <string>897 31 971 1085 0 0 1920 1178 </string>
1067 </dict> 1030 </dict>
1068 <key>Module</key> 1031 <key>Module</key>
1069 <string>PBXProjectFindModule</string> 1032 <string>PBXProjectFindModule</string>
1070 <key>Proportion</key> 1033 <key>Proportion</key>
1071 - <string>50%</string> 1034 + <string>293pt</string>
1072 </dict> 1035 </dict>
1073 </array> 1036 </array>
1074 <key>Proportion</key> 1037 <key>Proportion</key>
1075 - <string>428pt</string> 1038 + <string>1044pt</string>
1076 </dict> 1039 </dict>
1077 </array> 1040 </array>
1078 <key>Name</key> 1041 <key>Name</key>
@@ -1082,23 +1045,21 @@ @@ -1082,23 +1045,21 @@
1082 <string>PBXProjectFindModule</string> 1045 <string>PBXProjectFindModule</string>
1083 </array> 1046 </array>
1084 <key>StatusbarIsVisible</key> 1047 <key>StatusbarIsVisible</key>
1085 - <integer>1</integer> 1048 + <true/>
1086 <key>TableOfContents</key> 1049 <key>TableOfContents</key>
1087 <array> 1050 <array>
1088 <string>1C530D57069F1CE1000CFCEE</string> 1051 <string>1C530D57069F1CE1000CFCEE</string>
1089 - <string>1C530D58069F1CE1000CFCEE</string>  
1090 - <string>1C530D59069F1CE1000CFCEE</string> 1052 + <string>B84845DF0E80ACDE005A7BC9</string>
  1053 + <string>B84845E00E80ACDE005A7BC9</string>
1091 <string>1CDD528C0622207200134675</string> 1054 <string>1CDD528C0622207200134675</string>
1092 - <string>1C530D5A069F1CE1000CFCEE</string>  
1093 - <string>1CE0B1FE06471DED0097A5F4</string>  
1094 <string>1CD0528E0623707200166675</string> 1055 <string>1CD0528E0623707200166675</string>
1095 </array> 1056 </array>
1096 <key>WindowString</key> 1057 <key>WindowString</key>
1097 - <string>62 385 781 470 0 0 1440 878 </string> 1058 + <string>897 31 971 1085 0 0 1920 1178 </string>
1098 <key>WindowToolGUID</key> 1059 <key>WindowToolGUID</key>
1099 <string>1C530D57069F1CE1000CFCEE</string> 1060 <string>1C530D57069F1CE1000CFCEE</string>
1100 <key>WindowToolIsVisible</key> 1061 <key>WindowToolIsVisible</key>
1101 - <integer>0</integer> 1062 + <false/>
1102 </dict> 1063 </dict>
1103 <dict> 1064 <dict>
1104 <key>Identifier</key> 1065 <key>Identifier</key>
@@ -1131,7 +1092,7 @@ @@ -1131,7 +1092,7 @@
1131 <key>Frame</key> 1092 <key>Frame</key>
1132 <string>{{0, 0}, {981, 712}}</string> 1093 <string>{{0, 0}, {981, 712}}</string>
1133 <key>RubberWindowFrame</key> 1094 <key>RubberWindowFrame</key>
1134 - <string>2289 447 981 753 1920 300 1440 900 </string> 1095 + <string>2212 423 981 753 1920 300 1440 900 </string>
1135 </dict> 1096 </dict>
1136 <key>Module</key> 1097 <key>Module</key>
1137 <string>PBXDebugCLIModule</string> 1098 <string>PBXDebugCLIModule</string>
@@ -1154,13 +1115,13 @@ @@ -1154,13 +1115,13 @@
1154 <key>TableOfContents</key> 1115 <key>TableOfContents</key>
1155 <array> 1116 <array>
1156 <string>1C78EAAD065D492600B07095</string> 1117 <string>1C78EAAD065D492600B07095</string>
1157 - <string>B8A5C7430E756E6E005509DE</string> 1118 + <string>B84845C20E80A88C005A7BC9</string>
1158 <string>1C78EAAC065D492600B07095</string> 1119 <string>1C78EAAC065D492600B07095</string>
1159 </array> 1120 </array>
1160 <key>ToolbarConfiguration</key> 1121 <key>ToolbarConfiguration</key>
1161 <string>xcode.toolbar.config.consoleV3</string> 1122 <string>xcode.toolbar.config.consoleV3</string>
1162 <key>WindowString</key> 1123 <key>WindowString</key>
1163 - <string>2289 447 981 753 1920 300 1440 900 </string> 1124 + <string>2212 423 981 753 1920 300 1440 900 </string>
1164 <key>WindowToolGUID</key> 1125 <key>WindowToolGUID</key>
1165 <string>1C78EAAD065D492600B07095</string> 1126 <string>1C78EAAD065D492600B07095</string>
1166 <key>WindowToolIsVisible</key> 1127 <key>WindowToolIsVisible</key>
@@ -1653,7 +1614,7 @@ @@ -1653,7 +1614,7 @@
1653 <key>TableOfContents</key> 1614 <key>TableOfContents</key>
1654 <array> 1615 <array>
1655 <string>B8A523490E6E86CE006AA8E2</string> 1616 <string>B8A523490E6E86CE006AA8E2</string>
1656 - <string>B8A5234A0E6E86CE006AA8E2</string> 1617 + <string>B848460F0E80AFCB005A7BC9</string>
1657 <string>B8A523480E6E86CE006AA8E2</string> 1618 <string>B8A523480E6E86CE006AA8E2</string>
1658 </array> 1619 </array>
1659 <key>WindowString</key> 1620 <key>WindowString</key>
This diff could not be displayed because it is too large.
@@ -18,6 +18,8 @@ extern NSString * const MapImageLoadingCancelledNotification; @@ -18,6 +18,8 @@ extern NSString * const MapImageLoadingCancelledNotification;
18 18
19 @interface TileImage : NSObject { 19 @interface TileImage : NSObject {
20 UIImage *image; 20 UIImage *image;
  21 +
  22 +// CGImageRef image;
21 23
22 // I know this is a bit nasty. 24 // I know this is a bit nasty.
23 Tile tile; 25 Tile tile;
@@ -44,6 +46,9 @@ extern NSString * const MapImageLoadingCancelledNotification; @@ -44,6 +46,9 @@ extern NSString * const MapImageLoadingCancelledNotification;
44 - (void)drawInRect:(CGRect)rect; 46 - (void)drawInRect:(CGRect)rect;
45 - (void)draw; 47 - (void)draw;
46 48
  49 +- (void)moveBy: (CGSize) delta;
  50 +- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
  51 +
47 - (void)makeLayer; 52 - (void)makeLayer;
48 53
49 -(void) cancelLoading; 54 -(void) cancelLoading;
@@ -52,5 +57,7 @@ extern NSString * const MapImageLoadingCancelledNotification; @@ -52,5 +57,7 @@ extern NSString * const MapImageLoadingCancelledNotification;
52 57
53 @property (readwrite, assign) CGRect screenLocation; 58 @property (readwrite, assign) CGRect screenLocation;
54 @property (readonly, assign) Tile tile; 59 @property (readonly, assign) Tile tile;
  60 +@property (readonly) CALayer *layer;
  61 +@property (readonly) UIImage *image;
55 62
56 @end 63 @end
@@ -11,13 +11,15 @@ @@ -11,13 +11,15 @@
11 #import "TileLoader.h" 11 #import "TileLoader.h"
12 #import "FileTileImage.h" 12 #import "FileTileImage.h"
13 #import "TileCache.h" 13 #import "TileCache.h"
  14 +#import "MathUtils.h"
  15 +#import <QuartzCore/QuartzCore.h>
14 16
15 NSString * const MapImageLoadedNotification = @"MapImageLoaded"; 17 NSString * const MapImageLoadedNotification = @"MapImageLoaded";
16 NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancelled"; 18 NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancelled";
17 19
18 @implementation TileImage 20 @implementation TileImage
19 21
20 -@synthesize screenLocation, tile; 22 +@synthesize tile, layer, image;
21 23
22 - (id) initBlankTile: (Tile)_tile 24 - (id) initBlankTile: (Tile)_tile
23 { 25 {
@@ -75,7 +77,12 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell @@ -75,7 +77,12 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
75 - (void)dealloc 77 - (void)dealloc
76 { 78 {
77 [[NSNotificationCenter defaultCenter] removeObserver:self]; 79 [[NSNotificationCenter defaultCenter] removeObserver:self];
  80 +
  81 +// if (image)
  82 +// CGImageRelease(image);
  83 +
78 [image release]; 84 [image release];
  85 +
79 [super dealloc]; 86 [super dealloc];
80 } 87 }
81 /* 88 /*
@@ -95,7 +102,14 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell @@ -95,7 +102,14 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
95 - (void)drawInRect:(CGRect)rect 102 - (void)drawInRect:(CGRect)rect
96 { 103 {
97 [image drawInRect:rect]; 104 [image drawInRect:rect];
98 -// [image drawAtPoint:rect.origin]; 105 +/* if (image != NULL)
  106 + {
  107 + CGContextRef context = UIGraphicsGetCurrentContext();
  108 +
  109 + NSLog(@"image width = %f", CGImageGetWidth(image));
  110 + // CGContextClipToRect(context, rect);
  111 + CGContextDrawImage(context, rect, image);
  112 + }*/
99 } 113 }
100 114
101 -(void)draw 115 -(void)draw
@@ -103,11 +117,6 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell @@ -103,11 +117,6 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
103 [self drawInRect:screenLocation]; 117 [self drawInRect:screenLocation];
104 } 118 }
105 119
106 -- (void)makeLayer  
107 -{  
108 - layer = [CALayer layer];  
109 -}  
110 -  
111 + (TileImage*)imageWithTile: (Tile) _tile FromURL: (NSString*)url 120 + (TileImage*)imageWithTile: (Tile) _tile FromURL: (NSString*)url
112 { 121 {
113 return [[[WebTileImage alloc] initWithTile:_tile FromURL:url] autorelease]; 122 return [[[WebTileImage alloc] initWithTile:_tile FromURL:url] autorelease];
@@ -133,8 +142,17 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell @@ -133,8 +142,17 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
133 { 142 {
134 // CGContextRef context = 143 // CGContextRef context =
135 CGImageRef cgImage = CGImageCreateWithPNGDataProvider(CGDataProviderCreateWithCFData ((CFDataRef)data), NULL, FALSE, kCGRenderingIntentDefault); 144 CGImageRef cgImage = CGImageCreateWithPNGDataProvider(CGDataProviderCreateWithCFData ((CFDataRef)data), NULL, FALSE, kCGRenderingIntentDefault);
  145 +// CGImageRetain(image);
136 146
137 - image = [[UIImage imageWithCGImage:cgImage] retain]; 147 + if (layer == nil)
  148 + {
  149 + image = [[UIImage imageWithCGImage:cgImage] retain];
  150 + }
  151 + else
  152 + {
  153 + NSLog(@"Replacing image contents with data");
  154 + layer.contents = (id)cgImage;
  155 + }
138 156
139 NSDictionary *d = [NSDictionary dictionaryWithObject:data forKey:@"data"]; 157 NSDictionary *d = [NSDictionary dictionaryWithObject:data forKey:@"data"];
140 [[NSNotificationCenter defaultCenter] postNotificationName:MapImageLoadedNotification 158 [[NSNotificationCenter defaultCenter] postNotificationName:MapImageLoadedNotification
@@ -155,4 +173,51 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell @@ -155,4 +173,51 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
155 return TilesEqual(tile, [(TileImage*)anObject tile]); 173 return TilesEqual(tile, [(TileImage*)anObject tile]);
156 } 174 }
157 175
  176 +- (void)makeLayer
  177 +{
  178 + if (layer == nil)
  179 + {
  180 + layer = [[CALayer alloc] init];
  181 + layer.contents = nil;
  182 + layer.anchorPoint = CGPointMake(0.0f, 0.0f);
  183 + layer.bounds = CGRectMake(0, 0, screenLocation.size.width, screenLocation.size.height);
  184 + layer.position = screenLocation.origin;
  185 + }
  186 +
  187 + if (image != nil)
  188 + {
  189 + layer.contents = (id)[image CGImage];
  190 + [image release];
  191 + image = nil;
  192 + }
  193 +}
  194 +
  195 +- (void)moveBy: (CGSize) delta
  196 +{
  197 + self.screenLocation = TranslateCGRectBy(screenLocation, delta);
  198 +}
  199 +
  200 +- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
  201 +{
  202 + self.screenLocation = ScaleCGRectAboutPoint(screenLocation, zoomFactor, center);
  203 +}
  204 +
  205 +- (CGRect) screenLocation
  206 +{
  207 + return screenLocation;
  208 +}
  209 +
  210 +- (void) setScreenLocation: (CGRect)newScreenLocation
  211 +{
  212 +// NSLog(@"location moving from %f %f to %f %f", screenLocation.origin.x, screenLocation.origin.y, newScreenLocation.origin.x, newScreenLocation.origin.y);
  213 + screenLocation = newScreenLocation;
  214 +
  215 + if (layer != nil)
  216 + {
  217 + // layer.frame = screenLocation;
  218 + layer.position = screenLocation.origin;
  219 + layer.bounds = CGRectMake(0, 0, screenLocation.size.width, screenLocation.size.height);
  220 + }
  221 +}
  222 +
158 @end 223 @end
@@ -82,6 +82,11 @@ @@ -82,6 +82,11 @@
82 { 82 {
83 image.screenLocation = screenLocation; 83 image.screenLocation = screenLocation;
84 [images addObject:image]; 84 [images addObject:image];
  85 +
  86 + if (!TileIsDummy(image.tile) && [delegate respondsToSelector:@selector(tileAdded:WithImage:)])
  87 + {
  88 + [delegate tileAdded:tile WithImage:image];
  89 + }
85 } 90 }
86 91
87 -(void) addTile: (Tile) tile At: (CGRect) screenLocation 92 -(void) addTile: (Tile) tile At: (CGRect) screenLocation
@@ -175,9 +180,7 @@ @@ -175,9 +180,7 @@
175 { 180 {
176 for (TileImage *image in images) 181 for (TileImage *image in images)
177 { 182 {
178 - CGRect location = image.screenLocation;  
179 - location = TranslateCGRectBy(location, delta);  
180 - image.screenLocation = location; 183 + [image moveBy: delta];
181 } 184 }
182 } 185 }
183 186
@@ -185,9 +188,7 @@ @@ -185,9 +188,7 @@
185 { 188 {
186 for (TileImage *image in images) 189 for (TileImage *image in images)
187 { 190 {
188 - CGRect location = image.screenLocation;  
189 - location = ScaleCGRectAboutPoint(location, zoomFactor, center);  
190 - image.screenLocation = location; 191 + [image zoomByFactor:zoomFactor Near:center];
191 } 192 }
192 } 193 }
193 194
@@ -42,6 +42,7 @@ extern NSString * const MapImageRemovedFromScreenNotification; @@ -42,6 +42,7 @@ extern NSString * const MapImageRemovedFromScreenNotification;
42 //-(void) setNeedsRedraw; 42 //-(void) setNeedsRedraw;
43 43
44 //-(BOOL) needsRedraw; 44 //-(BOOL) needsRedraw;
  45 +-(void) assemble;
45 46
46 - (void)moveBy: (CGSize) delta; 47 - (void)moveBy: (CGSize) delta;
47 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center; 48 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
@@ -53,7 +53,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -53,7 +53,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
53 53
54 screenProjection = [screen retain]; 54 screenProjection = [screen retain];
55 tileSource = [source retain]; 55 tileSource = [source retain];
56 - 56 +
57 return self; 57 return self;
58 } 58 }
59 59
@@ -76,8 +76,25 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -76,8 +76,25 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
76 76
77 -(BOOL) screenIsLoaded 77 -(BOOL) screenIsLoaded
78 { 78 {
79 - return CGRectContainsRect(loadedBounds, [screenProjection screenBounds])  
80 - && loadedZoom == [[tileSource tileProjection] calculateZoomFromScale:[screenProjection scale]]; 79 +// return CGRectContainsRect(loadedBounds, [screenProjection screenBounds])
  80 +// && loadedZoom == [[tileSource tileProjection] calculateNormalisedZoomFromScale:[screenProjection scale]];
  81 +
  82 + BOOL contained = CGRectContainsRect(loadedBounds, [screenProjection screenBounds]);
  83 +
  84 + float targetZoom = [[tileSource tileProjection] calculateNormalisedZoomFromScale:[screenProjection scale]];
  85 +// && loadedZoom == ;
  86 +
  87 + if (contained == NO)
  88 + {
  89 + NSLog(@"reassembling because its not contained");
  90 + }
  91 +
  92 + if (targetZoom != loadedZoom)
  93 + {
  94 + NSLog(@"reassembling because target zoom = %f, loaded zoom = %d", targetZoom, loadedZoom);
  95 + }
  96 +
  97 + return contained && targetZoom == loadedZoom;
81 } 98 }
82 99
83 -(void) tileRemoved: (Tile) tile 100 -(void) tileRemoved: (Tile) tile
@@ -91,6 +108,11 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -91,6 +108,11 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
91 // [[NSNotificationCenter defaultCenter] postNotificationName:MapImageRemovedFromScreenNotification object:[NSValue valueWithBytes:&tile objCType:@encode(Tile)]]; 108 // [[NSNotificationCenter defaultCenter] postNotificationName:MapImageRemovedFromScreenNotification object:[NSValue valueWithBytes:&tile objCType:@encode(Tile)]];
92 } 109 }
93 110
  111 +-(CGRect) currentRendererBounds
  112 +{
  113 + return [screenProjection screenBounds];
  114 +}
  115 +
94 -(void) assemble 116 -(void) assemble
95 { 117 {
96 if ([self screenIsLoaded]) 118 if ([self screenIsLoaded])
@@ -104,7 +126,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -104,7 +126,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
104 FractalTileProjection *tileProjection = [tileSource tileProjection]; 126 FractalTileProjection *tileProjection = [tileSource tileProjection];
105 TileRect newTileRect = [tileProjection project:screenProjection]; 127 TileRect newTileRect = [tileProjection project:screenProjection];
106 128
107 - CGRect newLoadedBounds = [images addTiles:newTileRect ToDisplayIn:[screenProjection screenBounds]]; 129 + CGRect newLoadedBounds = [images addTiles:newTileRect ToDisplayIn:[self currentRendererBounds]];
108 130
109 if (!TileIsDummy(loadedTiles.origin.tile)) 131 if (!TileIsDummy(loadedTiles.origin.tile))
110 [images removeTiles:loadedTiles]; 132 [images removeTiles:loadedTiles];
@@ -120,12 +142,14 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -120,12 +142,14 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
120 { 142 {
121 [images moveBy:delta]; 143 [images moveBy:delta];
122 loadedBounds = TranslateCGRectBy(loadedBounds, delta); 144 loadedBounds = TranslateCGRectBy(loadedBounds, delta);
  145 +// [self assemble];
123 } 146 }
124 147
125 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center 148 - (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
126 { 149 {
127 [images zoomByFactor:zoomFactor Near:center]; 150 [images zoomByFactor:zoomFactor Near:center];
128 loadedBounds = ScaleCGRectAboutPoint(loadedBounds, zoomFactor, center); 151 loadedBounds = ScaleCGRectAboutPoint(loadedBounds, zoomFactor, center);
  152 +// [self assemble];
129 } 153 }
130 154
131 -(BOOL) containsRect: (CGRect)bounds 155 -(BOOL) containsRect: (CGRect)bounds
@@ -135,8 +159,8 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr @@ -135,8 +159,8 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
135 159
136 -(void) draw 160 -(void) draw
137 { 161 {
138 - [self assemble];  
139 - 162 +// [self assemble];
  163 +
140 [images draw]; 164 [images draw];
141 } 165 }
142 166
@@ -18,23 +18,14 @@ @@ -18,23 +18,14 @@
18 { 18 {
19 if (![super init]) 19 if (![super init])
20 return nil; 20 return nil;
21 -/* viewSize = size;  
22 - topLeft.x = 0;  
23 - topLeft.y = 0;  
24 -*/ 21 +
25 tileSource = _tileSource; 22 tileSource = _tileSource;
26 [tileSource retain]; 23 [tileSource retain];
27 FractalTileProjection *tileProjection = [tileSource tileProjection]; 24 FractalTileProjection *tileProjection = [tileSource tileProjection];
28 25
29 layer = [CATiledLayer layer]; 26 layer = [CATiledLayer layer];
30 layer.delegate = self; 27 layer.delegate = self;
31 -/*  
32 - [CATransaction begin];  
33 - [CATransaction setValue:[NSNumber numberWithFloat:0.0f]  
34 - forKey:kCATransactionAnimationDuration];  
35 - [CATransaction setValue:(id)kCFBooleanTrue  
36 - forKey:kCATransactionDisableActions];  
37 -*/ 28 +
38 layer.levelsOfDetail = tileProjection.maxZoom + 1; // check this. 29 layer.levelsOfDetail = tileProjection.maxZoom + 1; // check this.
39 layer.levelsOfDetailBias = 1; // Allows zoom level 0. 30 layer.levelsOfDetailBias = 1; // Allows zoom level 0.
40 31
@@ -45,10 +36,6 @@ @@ -45,10 +36,6 @@
45 layer.position = CGPointMake(0, 0); 36 layer.position = CGPointMake(0, 0);
46 37
47 [self setScale:1]; 38 [self setScale:1];
48 -// tiledLayer.transform = CATransform3DIdentity;  
49 -  
50 -// [CATransaction commit];  
51 -  
52 [layer setNeedsDisplay]; 39 [layer setNeedsDisplay];
53 40
54 return self; 41 return self;
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 8
9 #import "WebTileImage.h" 9 #import "WebTileImage.h"
10 #import "TileProxy.h" 10 #import "TileProxy.h"
  11 +#import <QuartzCore/CALayer.h>
11 12
12 @implementation WebTileImage 13 @implementation WebTileImage
13 14
@@ -82,6 +83,17 @@ @@ -82,6 +83,17 @@
82 [super cancelLoading]; 83 [super cancelLoading];
83 } 84 }
84 85
  86 +- (void)makeLayer
  87 +{
  88 + [super makeLayer];
  89 +
  90 + if (image == nil
  91 + && layer != nil
  92 + && layer.contents == nil)
  93 + {
  94 + layer.contents = (id)[[proxy image] CGImage];
  95 + }
  96 +}
85 - (void)drawInRect:(CGRect)rect 97 - (void)drawInRect:(CGRect)rect
86 { 98 {
87 if (image) 99 if (image)