Authored by Joseph G

Made CoreAnimationRenderer work

... ... @@ -13,7 +13,7 @@
@interface CoreAnimationRenderer : MapRenderer {
// CALayer *layer;
LayeredTileLoader *imageSet;
LayeredTileLoader *tileLoader;
}
@end
... ...
... ... @@ -11,19 +11,23 @@
#import <QuartzCore/QuartzCore.h>
#import "LayeredTileLoader.h"
#import "MathUtils.h"
#import "LayerToScreenProjection.h"
@implementation CoreAnimationRenderer
- (id) initWithView: (MapView *)_view
{
if (![super initWithView:_view])
ScreenProjection *_proj = [[ScreenProjection alloc] initWithBounds:[_view bounds]];
//[[LayerToScreenProjection alloc] initWithBounds:[_view bounds] InLayer:[_view layer]];
if (![super initWithView:_view ProjectingIn:_proj])
return nil;
// tileLayer.position = CGPointMake(0.0f,0.0f);
// tileLayer.transform = CATransform3DIdentity;
// tileLayer.bounds = [view bounds];
imageSet = [[LayeredTileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
tileLoader = [[LayeredTileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
/*
layer = [CAScrollLayer layer];
layer.anchorPoint = CGPointMake(0.0f, 0.0f);
... ... @@ -32,38 +36,27 @@
// [layer addSublayer:sublayer];
[view.layer addSublayer:[imageSet layer]];
[view.layer addSublayer:[tileLoader layer]];
return self;
}
-(void) recalculateImageSet
-(void)mapImageLoaded: (NSNotification*)notification
{
// NSLog(@"recalc");
// TileRect tileRect = [[[view tileSource] tileProjection] project:screenProjection];
// [imageSet assembleFromRect:tileRect FromImageSource:[view tileSource] ToDisplayIn:[view bounds] WithTileDelegate:self];
}
- (void)setNeedsDisplay
-(void) recalculateImageSet
{
// int loadedZoom = [imageSet loadedZoom];
// float scale = [screenProjection scale];
// int properZoom = [[[view tileSource] tileProjection] calculateNormalisedZoomFromScale:scale];
// if (![imageSet containsRect:[view bounds]]
// || loadedZoom != properZoom)
{
// NSLog(@"loadedZoom = %d properZoom = %d", loadedZoom, properZoom);
// CGRect bounds = [view bounds];
// NSLog(@"view bounds: %f x %f %f x %f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
// CGRect loadedBounds = [imageSet loadedBounds];
// NSLog(@"loadedBounds: %f x %f %f x %f", loadedBounds.origin.x, loadedBounds.origin.y, loadedBounds.size.width, loadedBounds.size.height);
[self recalculateImageSet];
}
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
[tileLoader assemble];
[super setNeedsDisplay];
[CATransaction commit];
}
-(void) moveToMercator: (MercatorPoint) point
... ... @@ -77,14 +70,33 @@
- (void)moveBy: (CGSize) delta
{
[imageSet moveBy:delta];
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
[super moveBy:delta];
[tileLoader moveBy:delta];
[tileLoader assemble];
[CATransaction commit];
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
[imageSet zoomByFactor:zoomFactor Near:center];
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
[super zoomByFactor:zoomFactor Near:center];
[tileLoader zoomByFactor:zoomFactor Near:center];
[tileLoader assemble];
[CATransaction commit];
}
... ...
//
// FileCache.h
// Images
//
// Created by Joseph Gentle on 31/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TileCache.h"
@interface FileCache : TileCache
{
}
@end
//
// FileCache.m
// Images
//
// Created by Joseph Gentle on 31/08/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "FileCache.h"
@implementation FileCache
-(TileImage*) cachedImage:(Tile)tile
{
return nil;
}
-(void)addTile: (Tile)tile WithImage: (TileImage*)image
{
}
@end
... ... @@ -16,6 +16,12 @@
if (![super initWithTile:_tile])
return nil;
// From the example in the documentation... :-/
/* CFURLRef url = CFURLCreateWithFileSystemPath (NULL, (CFStringRef)file, kCFURLPOSIXPathStyle, false);
CGDataProviderRef provider = CGDataProviderCreateWithURL (url);
CFRelease (url);
image = CGImageCreateWithPNGDataProvider (provider, NULL, true, kCGRenderingIntentDefault);
*/
image = [[UIImage alloc] initWithContentsOfFile:file];
[image retain];
// [self setImageToData:data];
... ... @@ -23,10 +29,4 @@
return self;
}
-(void)dealloc
{
[image release];
[super dealloc];
}
@end
... ...
//
// LayeredTileImageSet.h
// RouteMe
//
// Created by Joseph Gentle on 9/09/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "TileLoader.h"
@interface LayeredTileImageSet : TileLoader {
CALayer *layer;
}
@end
//
// LayeredTileImageSet.m
// RouteMe
//
// Created by Joseph Gentle on 9/09/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "LayeredTileImageSet.h"
@implementation LayeredTileImageSet
//-(id) initWithBounds:
@end
... ... @@ -13,8 +13,6 @@
@interface LayeredTileLoader : TileLoader {
CALayer *layer;
MercatorPoint layerPositionOffset;
}
@property (readonly, nonatomic) CALayer *layer;
... ...
... ... @@ -9,7 +9,7 @@
#import "LayeredTileLoader.h"
#import "ScreenProjection.h"
#import <QuartzCore/QuartzCore.h>
#import "MathUtils.h"
#import "TileImage.h"
@implementation LayeredTileLoader
... ... @@ -30,54 +30,55 @@
layer = [CAScrollLayer layer];
layer.anchorPoint = CGPointMake(0.0f, 0.0f);
layer.masksToBounds = YES;
if (screen != nil)
{
layer.frame = [screen screenBounds];
layerPositionOffset = [screen topLeft];
// layerPositionOffset = [screen topLeft];
}
CALayer *sublayer = [CALayer layer];
sublayer.frame = CGRectMake(100, 100, 256, 256);
NSString *path = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];
CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);
CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);
sublayer.contents = (id)image;
[layer addSublayer:sublayer];
// CALayer *sublayer = [CALayer layer];
// sublayer.frame = CGRectMake(160, 100, 256, 256);
// NSString *path = [[NSBundle mainBundle] pathForResource:@"loading" ofType:@"png"];
// CGDataProviderRef dataProvider = CGDataProviderCreateWithFilename([path UTF8String]);
// CGImageRef image = CGImageCreateWithPNGDataProvider(dataProvider, NULL, FALSE, kCGRenderingIntentDefault);
// sublayer.contents = (id)image;
// [layer addSublayer:sublayer];
return self;
}
- (void)moveBy: (CGSize) delta
- (void)tileAdded: (Tile) tile WithImage: (TileImage*) image;
{
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
[image makeLayer];
layer.position = TranslateCGPointBy(layer.position, delta);
[super moveBy:delta];
CALayer *sublayer = [image layer];
[CATransaction commit];
}
// CGRect frame = image.screenLocation;
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
// frame.origin.x -= layer.position.x;
// frame.origin.y -= layer.position.y;
CATransform3D transform = layer.transform;
transform = CATransform3DTranslate(transform, center.x, center.y, 0.0f);
transform = CATransform3DScale(transform, zoomFactor, zoomFactor, 1.0f);
transform = CATransform3DTranslate(transform, -center.x, -center.y, 0.0f);
layer.transform = transform;
// NSLog(@"Frame at %f %f %f,%f", frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
// NSLog(@"frame position %f,%f", layer.position.x, layer.position.y);
[super zoomByFactor:zoomFactor Near:center];
// sublayer.frame = frame;//GRectMake(layer.position.x, layer.position.y, 256, 256);
[CATransaction commit];
[layer addSublayer:sublayer];
// NSLog(@"added subimage");
}
-(void) tileRemoved: (Tile) tile
{
TileImage *image = [images imageWithTile:tile];
[[image layer] removeFromSuperlayer];
[[NSNotificationCenter defaultCenter] postNotificationName:MapImageRemovedFromScreenNotification object:image];
// NSLog(@"subimage removed");
}
//-(id) initWithBounds:
... ...
... ... @@ -18,6 +18,9 @@
MapView *view;
}
// Designated initialiser
- (id) initWithView: (MapView *)_view ProjectingIn: (ScreenProjection*) _screenProjection;
// This makes a screen projection from the view
- (id) initWithView: (MapView *)view;
- (void)drawRect:(CGRect)rect;
... ... @@ -28,6 +31,7 @@
- (void)moveBy: (CGSize) delta;
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
-(void) recalculateImageSet;
- (void)setNeedsDisplay;
@property (readwrite) double scale;
... ...
... ... @@ -16,13 +16,14 @@
@implementation MapRenderer
- (id) initWithView: (MapView *)_view
// Designated initialiser
- (id) initWithView: (MapView *)_view ProjectingIn: (ScreenProjection*) _screenProjection
{
if (![super init])
return nil;
view = _view;
screenProjection = [[ScreenProjection alloc] initWithBounds:[view bounds]];
screenProjection = _screenProjection;//[[ScreenProjection alloc] initWithBounds:[view bounds]];
CLLocationCoordinate2D here;
here.latitude = -33.9464;
... ... @@ -35,6 +36,13 @@
return self;
}
- (id) initWithView: (MapView *)_view
{
ScreenProjection *_screenProjection = [[ScreenProjection alloc] initWithBounds:[_view bounds]];
return [self initWithView:_view ProjectingIn:_screenProjection];
}
-(void) dealloc
{
[screenProjection release];
... ... @@ -62,17 +70,22 @@
- (void)moveBy: (CGSize) delta
{
[screenProjection moveBy:delta];
[self setNeedsDisplay];
[view setNeedsDisplay];
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
[screenProjection zoomByFactor:zoomFactor Near:center];
[self setNeedsDisplay];
[view setNeedsDisplay];
}
-(void) recalculateImageSet
{
}
- (void)setNeedsDisplay
{
[self recalculateImageSet];
[view setNeedsDisplay];
}
... ...
... ... @@ -28,7 +28,6 @@
return;
tileSource = [[OpenStreetMapsSource alloc] init];
// tileSource = [[MemoryCache alloc] initWithParentSource:tileSource Capacity:20];
}
-(void) makeRenderer
... ... @@ -41,8 +40,8 @@
if (renderer != nil)
return;
renderer = [[QuartzRenderer alloc] initWithView:self];
// renderer = [[CoreAnimationRenderer alloc] initWithView:self];
// renderer = [[QuartzRenderer alloc] initWithView:self];
renderer = [[CoreAnimationRenderer alloc] initWithView:self];
}
/*
... ... @@ -123,23 +122,18 @@
[super dealloc];
}
- (void)drawRect:(CGRect)rect
{
[renderer drawRect: rect];
}
/*
- (void)drawRect:(CGRect)rect {
// imageSet = [tileSource tileImagesForScreen: screenProjection];
if ([imageSet needsRedraw])
// if ([imageSet needsRedraw])
{
// [self recalculateImageSet];
NSLog(@"WARNING - Image set needs redraw and we're in drawRect.");
// NSLog(@"WARNING - Image set needs redraw and we're in drawRect.");
}
[imageSet draw];
[renderer drawRect:rect];
// [self setNeedsDisplay];
}*/
}
/*
- (NSSet*) touchesOnScreenIn: (UIEvent *)event
... ... @@ -228,6 +222,16 @@
{
lastGesture = [self getGestureDetails:[event allTouches]];
for (UITouch *touch in touches)
{
if ([touch phase] == UITouchPhaseBegan
|| [touch phase] == UITouchPhaseMoved
|| [touch phase] == UITouchPhaseStationary)
return;
}
NSLog(@"Assemble.");
[renderer recalculateImageSet];
// NSLog(@"touchesEnded %d ... lastgesture at %f, %f", [[event allTouches] count], lastGesture.center.x, lastGesture.center.y);
}
... ... @@ -266,6 +270,7 @@
// if ([imageSet needsRedraw])
// [self recalculateImageSet];
}
@end
... ...
... ... @@ -40,7 +40,7 @@
-(void) removeTile: (Tile) tile
{
// NSLog(@"tile removed from cache");
NSLog(@"tile removed from cache");
[cache removeObjectForKey:[TileCache tileHash: tile]];
}
... ...
... ... @@ -14,8 +14,7 @@
@class TileLoader;
@interface QuartzRenderer : MapRenderer {
// This is basically a one-object allocation pool.
TileLoader *imageSet;
TileLoader *tileLoader;
}
@end
... ...
... ... @@ -22,55 +22,39 @@
if (![super initWithView:_view])
return nil;
imageSet = [[TileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
tileLoader = [[TileLoader alloc] initForScreen:screenProjection FromImageSource:[view tileSource]];
return self;
}
-(void) recalculateImageSet
-(void) dealloc
{
// NSLog(@"recalc");
// TileRect tileRect = [[[view tileSource] tileProjection] project:screenProjection];
// [imageSet assembleFromRect:tileRect FromImageSource:[view tileSource] ToDisplayIn:[view bounds] WithTileDelegate:self];
[tileLoader release];
[super dealloc];
}
- (void)drawRect:(CGRect)rect
-(void) recalculateImageSet
{
[imageSet draw];
[tileLoader assemble];
}
- (void)setNeedsDisplay
- (void)drawRect:(CGRect)rect
{
int loadedZoom = [imageSet loadedZoom];
float scale = [screenProjection scale];
int properZoom = [[[view tileSource] tileProjection] calculateNormalisedZoomFromScale:scale];
if (![imageSet containsRect:[view bounds]]
|| loadedZoom != properZoom)
{
// NSLog(@"loadedZoom = %d properZoom = %d", loadedZoom, properZoom);
// CGRect bounds = [view bounds];
// NSLog(@"view bounds: %f x %f %f x %f", bounds.origin.x, bounds.origin.y, bounds.size.width, bounds.size.height);
// CGRect loadedBounds = [imageSet loadedBounds];
// NSLog(@"loadedBounds: %f x %f %f x %f", loadedBounds.origin.x, loadedBounds.origin.y, loadedBounds.size.width, loadedBounds.size.height);
[self recalculateImageSet];
}
[super setNeedsDisplay];
[tileLoader draw];
}
- (void)moveBy: (CGSize) delta
{
[imageSet moveBy:delta];
[super moveBy:delta];
[tileLoader moveBy:delta];
[tileLoader assemble];
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
[imageSet zoomByFactor:zoomFactor Near:center];
[super zoomByFactor:zoomFactor Near:center];
[tileLoader zoomByFactor:zoomFactor Near:center];
[tileLoader assemble];
}
- (void)tileDidFinishLoading: (TileImage *)image
... ...
... ... @@ -12,7 +12,7 @@
B87626D00E752A010024B9C5 /* MapRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626CE0E752A010024B9C5 /* MapRenderer.h */; };
B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */; };
B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */; };
B87626E90E7562620024B9C5 /* TileImageSet.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428260E6BEA390080B2F5 /* TileImageSet.m */; };
B87626E90E7562620024B9C5 /* TileLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428260E6BEA390080B2F5 /* TileLoader.m */; };
B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = B87626EF0E75654C0024B9C5 /* MathUtils.h */; };
B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = B87626F00E75654C0024B9C5 /* MathUtils.c */; };
B894284D0E6BEAB20080B2F5 /* ImagesAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B894284B0E6BEAB20080B2F5 /* ImagesAppDelegate.m */; };
... ... @@ -35,6 +35,13 @@
B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8790E757FC8005509DE /* MapRenderer.m */; };
B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */; };
B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */; };
B8A5C9220E75A107005509DE /* LayeredTileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5C9200E75A107005509DE /* LayeredTileLoader.h */; };
B8A5C9230E75A107005509DE /* LayeredTileLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C9210E75A107005509DE /* LayeredTileLoader.m */; };
B8A5C9BF0E763371005509DE /* Tile.c in Sources */ = {isa = PBXBuildFile; fileRef = B8A5C9BE0E763371005509DE /* Tile.c */; };
B8A5CB170E764C84005509DE /* TileImageSet.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A5CB150E764C84005509DE /* TileImageSet.h */; };
B8A5CB180E764C84005509DE /* TileImageSet.m in Sources */ = {isa = PBXBuildFile; fileRef = B8A5CB160E764C84005509DE /* TileImageSet.m */; };
B8C6B1290E78C79200C12A12 /* LayerToScreenProjection.h in Headers */ = {isa = PBXBuildFile; fileRef = B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */; };
B8C6B12A0E78C79200C12A12 /* LayerToScreenProjection.m in Sources */ = {isa = PBXBuildFile; fileRef = B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */; };
B8D9B0640E6BEBCC00EDA368 /* FlipsideView.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428440E6BEA3A0080B2F5 /* FlipsideView.m */; };
B8D9B0BD0E6BECD400EDA368 /* pj_tsfn.c in Sources */ = {isa = PBXBuildFile; fileRef = B89428140E6BEA390080B2F5 /* pj_tsfn.c */; };
B8D9B0BE0E6BECD400EDA368 /* PJ_tmerc.c in Sources */ = {isa = PBXBuildFile; fileRef = B89427AC0E6BEA390080B2F5 /* PJ_tmerc.c */; };
... ... @@ -194,7 +201,7 @@
B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428290E6BEA390080B2F5 /* MemoryCache.m */; };
B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = B894283A0E6BEA3A0080B2F5 /* TiledLayerController.m */; };
B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428360E6BEA3A0080B2F5 /* Mercator.m */; };
B8D9B1F50E6BFA7500EDA368 /* FileCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282B0E6BEA390080B2F5 /* FileCache.m */; };
B8D9B1F50E6BFA7500EDA368 /* DiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282B0E6BEA390080B2F5 /* DiskCache.m */; };
B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428340E6BEA390080B2F5 /* Transform.m */; };
B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B89428240E6BEA390080B2F5 /* TileImage.m */; };
B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */ = {isa = PBXBuildFile; fileRef = B894282F0E6BEA390080B2F5 /* WebTileImage.m */; };
... ... @@ -207,7 +214,7 @@
B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428370E6BEA3A0080B2F5 /* FractalTileProjection.h */; };
B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428390E6BEA3A0080B2F5 /* TiledLayerController.h */; };
B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428230E6BEA390080B2F5 /* TileImage.h */; };
B8D9B2030E6BFA7F00EDA368 /* FileCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282A0E6BEA390080B2F5 /* FileCache.h */; };
B8D9B2030E6BFA7F00EDA368 /* DiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282A0E6BEA390080B2F5 /* DiskCache.h */; };
B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = B894282C0E6BEA390080B2F5 /* TileProxy.h */; };
B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428280E6BEA390080B2F5 /* MemoryCache.h */; };
B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */ = {isa = PBXBuildFile; fileRef = B89428220E6BEA390080B2F5 /* Tile.h */; };
... ... @@ -410,13 +417,13 @@
B89428220E6BEA390080B2F5 /* Tile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Tile.h; sourceTree = "<group>"; };
B89428230E6BEA390080B2F5 /* TileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileImage.h; sourceTree = "<group>"; };
B89428240E6BEA390080B2F5 /* TileImage.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileImage.m; sourceTree = "<group>"; };
B89428250E6BEA390080B2F5 /* TileImageSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileImageSet.h; sourceTree = "<group>"; };
B89428260E6BEA390080B2F5 /* TileImageSet.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileImageSet.m; sourceTree = "<group>"; };
B89428250E6BEA390080B2F5 /* TileLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileLoader.h; sourceTree = "<group>"; };
B89428260E6BEA390080B2F5 /* TileLoader.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileLoader.m; sourceTree = "<group>"; };
B89428270E6BEA390080B2F5 /* TileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileCache.h; sourceTree = "<group>"; };
B89428280E6BEA390080B2F5 /* MemoryCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryCache.h; sourceTree = "<group>"; };
B89428290E6BEA390080B2F5 /* MemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = MemoryCache.m; sourceTree = "<group>"; };
B894282A0E6BEA390080B2F5 /* FileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FileCache.h; sourceTree = "<group>"; };
B894282B0E6BEA390080B2F5 /* FileCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = FileCache.m; sourceTree = "<group>"; };
B894282A0E6BEA390080B2F5 /* DiskCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DiskCache.h; sourceTree = "<group>"; };
B894282B0E6BEA390080B2F5 /* DiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = DiskCache.m; sourceTree = "<group>"; };
B894282C0E6BEA390080B2F5 /* TileProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TileProxy.h; sourceTree = "<group>"; };
B894282D0E6BEA390080B2F5 /* TileProxy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = TileProxy.m; sourceTree = "<group>"; };
B894282E0E6BEA390080B2F5 /* WebTileImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebTileImage.h; sourceTree = "<group>"; };
... ... @@ -461,6 +468,13 @@
B8A5C8790E757FC8005509DE /* MapRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapRenderer.m; sourceTree = "<group>"; };
B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreAnimationRenderer.h; sourceTree = "<group>"; };
B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreAnimationRenderer.m; sourceTree = "<group>"; };
B8A5C9200E75A107005509DE /* LayeredTileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayeredTileLoader.h; sourceTree = "<group>"; };
B8A5C9210E75A107005509DE /* LayeredTileLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LayeredTileLoader.m; sourceTree = "<group>"; };
B8A5C9BE0E763371005509DE /* Tile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = Tile.c; sourceTree = "<group>"; };
B8A5CB150E764C84005509DE /* TileImageSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TileImageSet.h; sourceTree = "<group>"; };
B8A5CB160E764C84005509DE /* TileImageSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TileImageSet.m; sourceTree = "<group>"; };
B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerToScreenProjection.h; sourceTree = "<group>"; };
B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LayerToScreenProjection.m; sourceTree = "<group>"; };
B8D9B0B70E6BEC1900EDA368 /* libproj4.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libproj4.a; sourceTree = BUILT_PRODUCTS_DIR; };
B8D9B17D0E6BF0D600EDA368 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; };
B8D9B17E0E6BF0DD00EDA368 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
... ... @@ -539,6 +553,8 @@
B87626D30E752B640024B9C5 /* Quartz Renderer */,
B8A5C8780E757E95005509DE /* Core Animation Renderer */,
B87626D20E752B280024B9C5 /* Tiled Layer Renderer */,
B89428250E6BEA390080B2F5 /* TileLoader.h */,
B89428260E6BEA390080B2F5 /* TileLoader.m */,
B87626C80E7529BE0024B9C5 /* ScreenProjection.h */,
B87626C90E7529BE0024B9C5 /* ScreenProjection.m */,
B87626CE0E752A010024B9C5 /* MapRenderer.h */,
... ... @@ -559,8 +575,6 @@
B87626D30E752B640024B9C5 /* Quartz Renderer */ = {
isa = PBXGroup;
children = (
B89428250E6BEA390080B2F5 /* TileImageSet.h */,
B89428260E6BEA390080B2F5 /* TileImageSet.m */,
B87626D50E752E6E0024B9C5 /* QuartzRenderer.h */,
B87626D60E752E6E0024B9C5 /* QuartzRenderer.m */,
);
... ... @@ -574,8 +588,8 @@
B8A51E900E6D7192006AA8E2 /* TileCache.m */,
B89428280E6BEA390080B2F5 /* MemoryCache.h */,
B89428290E6BEA390080B2F5 /* MemoryCache.m */,
B894282A0E6BEA390080B2F5 /* FileCache.h */,
B894282B0E6BEA390080B2F5 /* FileCache.m */,
B894282A0E6BEA390080B2F5 /* DiskCache.h */,
B894282B0E6BEA390080B2F5 /* DiskCache.m */,
);
name = Cache;
sourceTree = "<group>";
... ... @@ -755,8 +769,8 @@
B87626CC0E7529CF0024B9C5 /* Renderers */,
B894283B0E6BEA3A0080B2F5 /* MapView.h */,
B894283C0E6BEA3A0080B2F5 /* MapView.m */,
B89428300E6BEA390080B2F5 /* Projections */,
B89428210E6BEA390080B2F5 /* Tile Management */,
B89428300E6BEA390080B2F5 /* Projections */,
B894281D0E6BEA390080B2F5 /* Tile Source */,
);
name = "Map View";
... ... @@ -777,6 +791,7 @@
children = (
B87626D40E752DF30024B9C5 /* Cache */,
B89428220E6BEA390080B2F5 /* Tile.h */,
B8A5C9BE0E763371005509DE /* Tile.c */,
B89428230E6BEA390080B2F5 /* TileImage.h */,
B89428240E6BEA390080B2F5 /* TileImage.m */,
B894282C0E6BEA390080B2F5 /* TileProxy.h */,
... ... @@ -785,6 +800,8 @@
B894282F0E6BEA390080B2F5 /* WebTileImage.m */,
B8D9B27B0E6D460500EDA368 /* FileTileImage.h */,
B8D9B27C0E6D460500EDA368 /* FileTileImage.m */,
B8A5CB150E764C84005509DE /* TileImageSet.h */,
B8A5CB160E764C84005509DE /* TileImageSet.m */,
);
name = "Tile Management";
sourceTree = "<group>";
... ... @@ -868,6 +885,10 @@
children = (
B8A5C8840E758250005509DE /* CoreAnimationRenderer.h */,
B8A5C8850E758250005509DE /* CoreAnimationRenderer.m */,
B8A5C9200E75A107005509DE /* LayeredTileLoader.h */,
B8A5C9210E75A107005509DE /* LayeredTileLoader.m */,
B8C6B1270E78C79200C12A12 /* LayerToScreenProjection.h */,
B8C6B1280E78C79200C12A12 /* LayerToScreenProjection.m */,
);
name = "Core Animation Renderer";
sourceTree = "<group>";
... ... @@ -899,7 +920,7 @@
B8D9B2000E6BFA7F00EDA368 /* FractalTileProjection.h in Headers */,
B8D9B2010E6BFA7F00EDA368 /* TiledLayerController.h in Headers */,
B8D9B2020E6BFA7F00EDA368 /* TileImage.h in Headers */,
B8D9B2030E6BFA7F00EDA368 /* FileCache.h in Headers */,
B8D9B2030E6BFA7F00EDA368 /* DiskCache.h in Headers */,
B8D9B2040E6BFA7F00EDA368 /* TileProxy.h in Headers */,
B8D9B2060E6BFA7F00EDA368 /* MemoryCache.h in Headers */,
B8D9B2070E6BFA7F00EDA368 /* Tile.h in Headers */,
... ... @@ -916,6 +937,9 @@
B87626D70E752E6E0024B9C5 /* QuartzRenderer.h in Headers */,
B87626F10E75654C0024B9C5 /* MathUtils.h in Headers */,
B8A5C8860E758250005509DE /* CoreAnimationRenderer.h in Headers */,
B8A5C9220E75A107005509DE /* LayeredTileLoader.h in Headers */,
B8A5CB170E764C84005509DE /* TileImageSet.h in Headers */,
B8C6B1290E78C79200C12A12 /* LayerToScreenProjection.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
... ... @@ -1181,7 +1205,7 @@
B8D9B1F20E6BFA7500EDA368 /* MemoryCache.m in Sources */,
B8D9B1F30E6BFA7500EDA368 /* TiledLayerController.m in Sources */,
B8D9B1F40E6BFA7500EDA368 /* Mercator.m in Sources */,
B8D9B1F50E6BFA7500EDA368 /* FileCache.m in Sources */,
B8D9B1F50E6BFA7500EDA368 /* DiskCache.m in Sources */,
B8D9B1F60E6BFA7500EDA368 /* Transform.m in Sources */,
B8D9B1F70E6BFA7500EDA368 /* TileImage.m in Sources */,
B8D9B1F80E6BFA7500EDA368 /* WebTileImage.m in Sources */,
... ... @@ -1194,10 +1218,14 @@
B8A51E910E6D7192006AA8E2 /* TileCache.m in Sources */,
B87626CB0E7529BE0024B9C5 /* ScreenProjection.m in Sources */,
B87626D80E752E6E0024B9C5 /* QuartzRenderer.m in Sources */,
B87626E90E7562620024B9C5 /* TileImageSet.m in Sources */,
B87626E90E7562620024B9C5 /* TileLoader.m in Sources */,
B87626F20E75654C0024B9C5 /* MathUtils.c in Sources */,
B8A5C87A0E757FC8005509DE /* MapRenderer.m in Sources */,
B8A5C8870E758250005509DE /* CoreAnimationRenderer.m in Sources */,
B8A5C9230E75A107005509DE /* LayeredTileLoader.m in Sources */,
B8A5C9BF0E763371005509DE /* Tile.c in Sources */,
B8A5CB180E764C84005509DE /* TileImageSet.m in Sources */,
B8C6B12A0E78C79200C12A12 /* LayerToScreenProjection.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
... ... @@ -1233,6 +1261,7 @@
"\"$(SRCROOT)/build/Release-iphoneos\"",
);
PRODUCT_NAME = RouteMe;
SDKROOT = iphoneos2.1;
};
name = Debug;
};
... ... @@ -1250,6 +1279,7 @@
"\"$(SRCROOT)/build/Release-iphoneos\"",
);
PRODUCT_NAME = RouteMe;
SDKROOT = iphoneos2.1;
};
name = Release;
};
... ... @@ -1290,6 +1320,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
PREBINDING = NO;
PRODUCT_NAME = MapView;
SDKROOT = iphoneos2.1;
};
name = Debug;
};
... ... @@ -1303,6 +1334,7 @@
GCC_ENABLE_FIX_AND_CONTINUE = NO;
PREBINDING = NO;
PRODUCT_NAME = MapView;
SDKROOT = iphoneos2.1;
ZERO_LINK = NO;
};
name = Release;
... ...
... ... @@ -233,6 +233,8 @@
<key>Layout</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
... ... @@ -258,7 +260,7 @@
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
<real>244</real>
<real>284</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
... ... @@ -271,14 +273,16 @@
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>29B97314FDCFA39411CA2CEA</string>
<string>B894285B0E6BEAE40080B2F5</string>
<string>B89428520E6BEAC70080B2F5</string>
<string>B894281C0E6BEA390080B2F5</string>
<string>B87626EE0E7565350024B9C5</string>
<string>B87626CC0E7529CF0024B9C5</string>
<string>B87626D30E752B640024B9C5</string>
<string>B89428300E6BEA390080B2F5</string>
<string>B8A5C8780E757E95005509DE</string>
<string>B87626D20E752B280024B9C5</string>
<string>B89428210E6BEA390080B2F5</string>
<string>19C28FACFE9D520D11CA2CBB</string>
<string>B87626D40E752DF30024B9C5</string>
<string>B89428300E6BEA390080B2F5</string>
<string>B894281D0E6BEA390080B2F5</string>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
... ... @@ -286,14 +290,15 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>40</integer>
<integer>37</integer>
<integer>16</integer>
<integer>20</integer>
<integer>14</integer>
<integer>10</integer>
<integer>6</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {266, 1064}}</string>
<string>{{0, 0}, {306, 1064}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
... ... @@ -305,34 +310,32 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {283, 1082}}</string>
<string>{{0, 0}, {323, 1082}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
<real>244</real>
<real>284</real>
</array>
<key>RubberWindowFrame</key>
<string>7 55 1916 1123 0 0 1920 1178 </string>
<string>6 55 1916 1123 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>283pt</string>
<string>323pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>TileImageSet.m</string>
<string>LayerToScreenProjection.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
... ... @@ -340,11 +343,11 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>TileImageSet.m</string>
<string>LayerToScreenProjection.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>B8A5C8760E757DDF005509DE</string>
<string>B848462A0E80B0A6005A7BC9</string>
<key>history</key>
<array>
<string>B89429560E6BEB760080B2F5</string>
... ... @@ -370,55 +373,70 @@
<string>B8D9B2170E6BFBF700EDA368</string>
<string>B8D9B2450E6BFE0C00EDA368</string>
<string>B8D9B2750E6D152500EDA368</string>
<string>B8A51E9F0E6D73CC006AA8E2</string>
<string>B8A51EAA0E6D73CC006AA8E2</string>
<string>B8A51FAE0E6D7AAA006AA8E2</string>
<string>B8A51FC30E6D7B5E006AA8E2</string>
<string>B8A51FD90E6D7BEB006AA8E2</string>
<string>B8A51FE70E6D8604006AA8E2</string>
<string>B8A51FE90E6D8604006AA8E2</string>
<string>B8A51FEE0E6D8604006AA8E2</string>
<string>B8A5200F0E6D8F42006AA8E2</string>
<string>B8A520220E6D9456006AA8E2</string>
<string>B8A520230E6D9456006AA8E2</string>
<string>B8A520700E6E39AD006AA8E2</string>
<string>B8A520D90E6E4ED0006AA8E2</string>
<string>B8A520DA0E6E4ED0006AA8E2</string>
<string>B8A521F50E6E74AB006AA8E2</string>
<string>B8A522610E6E850D006AA8E2</string>
<string>B8A522620E6E850D006AA8E2</string>
<string>B8A523400E6E86CE006AA8E2</string>
<string>B87627050E7566990024B9C5</string>
<string>B87627060E7566990024B9C5</string>
<string>B87627070E7566990024B9C5</string>
<string>B876270A0E7566990024B9C5</string>
<string>B876270C0E7566990024B9C5</string>
<string>B876270D0E7566990024B9C5</string>
<string>B87627170E7566990024B9C5</string>
<string>B87627190E7566990024B9C5</string>
<string>B876283B0E756CAE0024B9C5</string>
<string>B876283E0E756CAE0024B9C5</string>
<string>B87628400E756CAE0024B9C5</string>
<string>B8A5C7690E756F6B005509DE</string>
<string>B8A5C76A0E756F6B005509DE</string>
<string>B8A5C76B0E756F6B005509DE</string>
<string>B8A5C76C0E756F6B005509DE</string>
<string>B8A5C76D0E756F6B005509DE</string>
<string>B8A5C78B0E757042005509DE</string>
<string>B8A5C78C0E757042005509DE</string>
<string>B8A5C7A80E757175005509DE</string>
<string>B8A5C7CD0E75745C005509DE</string>
<string>B8A5C7CE0E75745C005509DE</string>
<string>B8A5C7D00E75745C005509DE</string>
<string>B8A5C7D20E75745C005509DE</string>
<string>B8A5C81A0E757738005509DE</string>
<string>B8A5C81B0E757738005509DE</string>
<string>B8A5C8510E757B48005509DE</string>
<string>B8A5C8520E757B48005509DE</string>
<string>B8A5C8530E757B48005509DE</string>
<string>B8A5C85F0E757BC9005509DE</string>
<string>B8A5C8680E757D29005509DE</string>
<string>B8A5C8690E757D29005509DE</string>
<string>B8A5C92A0E762E71005509DE</string>
<string>B8A5C92C0E762E71005509DE</string>
<string>B8A5C9C80E763852005509DE</string>
<string>B8A5CA040E763FD8005509DE</string>
<string>B8A5CA060E763FD8005509DE</string>
<string>B8A5CBB20E7656EE005509DE</string>
<string>B8A5CBB30E7656EE005509DE</string>
<string>B8A5CBCD0E765D9F005509DE</string>
<string>B8A5CC440E765F27005509DE</string>
<string>B8A5CC610E76620C005509DE</string>
<string>B8A5CC640E76620C005509DE</string>
<string>B8A5CCC10E7666C6005509DE</string>
<string>B8A5CD390E767286005509DE</string>
<string>B8A5CD770E7677D2005509DE</string>
<string>B80AED7E0E7775110031DF63</string>
<string>B8C6AF650E77A6DB00C12A12</string>
<string>B8C6AF9E0E77AAD400C12A12</string>
<string>B8C6AFB00E77AC3D00C12A12</string>
<string>B8C6AFB10E77AC3D00C12A12</string>
<string>B8C6B0110E77B94900C12A12</string>
<string>B8C6B07F0E77C10D00C12A12</string>
<string>B8C6B08D0E77C25B00C12A12</string>
<string>B8C6B09C0E77C2C100C12A12</string>
<string>B8C6B09D0E77C2C100C12A12</string>
<string>B87F17A00E7B7CD000C90CBC</string>
<string>B87F17A50E7B7CD000C90CBC</string>
<string>B83ADFC40E7E2DAA00BB0D25</string>
<string>B83ADFF70E7E355D00BB0D25</string>
<string>B83ADFFC0E7E355D00BB0D25</string>
<string>B83AE0420E7E362600BB0D25</string>
<string>B83AE0800E7EE70000BB0D25</string>
<string>B83AE0E00E7F5E6A00BB0D25</string>
<string>B83AE10F0E7F612500BB0D25</string>
<string>B83AE12A0E7F633E00BB0D25</string>
<string>B83AE1440E7F6B7500BB0D25</string>
<string>B83AE1450E7F6B7500BB0D25</string>
<string>B84845BD0E80A88C005A7BC9</string>
<string>B84845EE0E80AFCB005A7BC9</string>
<string>B84845EF0E80AFCB005A7BC9</string>
<string>B84845F10E80AFCB005A7BC9</string>
<string>B84845F20E80AFCB005A7BC9</string>
<string>B84845F30E80AFCB005A7BC9</string>
<string>B84845F40E80AFCB005A7BC9</string>
<string>B84846130E80AFFC005A7BC9</string>
<string>B848461A0E80B044005A7BC9</string>
<string>B848461B0E80B044005A7BC9</string>
<string>B84846240E80B0A6005A7BC9</string>
<string>B84846250E80B0A6005A7BC9</string>
<string>B84846260E80B0A6005A7BC9</string>
</array>
<key>prevStack</key>
<array>
... ... @@ -472,7 +490,6 @@
<string>B8A51E550E6D5F38006AA8E2</string>
<string>B8A51E580E6D5F38006AA8E2</string>
<string>B8A51E590E6D5F38006AA8E2</string>
<string>B8A51E6F0E6D5F7D006AA8E2</string>
<string>B8A51E830E6D6F5D006AA8E2</string>
<string>B8A51EC00E6D73CC006AA8E2</string>
<string>B8A51EC10E6D73CC006AA8E2</string>
... ... @@ -488,102 +505,54 @@
<string>B876272B0E7566990024B9C5</string>
<string>B87627510E7566990024B9C5</string>
<string>B87627520E7566990024B9C5</string>
<string>B87628090E7566990024B9C5</string>
<string>B876280C0E7566990024B9C5</string>
<string>B87628770E756CAE0024B9C5</string>
<string>B8A5C76E0E756F6B005509DE</string>
<string>B8A5C76F0E756F6B005509DE</string>
<string>B8A5C7700E756F6B005509DE</string>
<string>B8A5C7710E756F6B005509DE</string>
<string>B8A5C7720E756F6B005509DE</string>
<string>B8A5C7730E756F6B005509DE</string>
<string>B8A5C7740E756F6B005509DE</string>
<string>B8A5C77D0E756FA7005509DE</string>
<string>B8A5C78E0E757042005509DE</string>
<string>B8A5C78F0E757042005509DE</string>
<string>B8A5C7980E7570A0005509DE</string>
<string>B8A5C7990E7570A0005509DE</string>
<string>B8A5C79E0E7570BB005509DE</string>
<string>B8A5C79F0E7570BB005509DE</string>
<string>B8A5C7AB0E757175005509DE</string>
<string>B8A5C7AC0E757175005509DE</string>
<string>B8A5C7AD0E757175005509DE</string>
<string>B8A5C7AE0E757175005509DE</string>
<string>B8A5C7AF0E757175005509DE</string>
<string>B8A5C7BA0E75726C005509DE</string>
<string>B8A5C7BB0E75726C005509DE</string>
<string>B8A5C7BC0E75726C005509DE</string>
<string>B8A5C7BD0E75726C005509DE</string>
<string>B8A5C7BE0E75726C005509DE</string>
<string>B8A5C7BF0E75726C005509DE</string>
<string>B8A5C7C00E75726C005509DE</string>
<string>B8A5C7C10E75726C005509DE</string>
<string>B8A5C7C20E75726C005509DE</string>
<string>B8A5C7D50E75745C005509DE</string>
<string>B8A5C7D60E75745C005509DE</string>
<string>B8A5C7D70E75745C005509DE</string>
<string>B8A5C7D80E75745C005509DE</string>
<string>B8A5C7D90E75745C005509DE</string>
<string>B8A5C7DA0E75745C005509DE</string>
<string>B8A5C7DB0E75745C005509DE</string>
<string>B8A5C7DC0E75745C005509DE</string>
<string>B8A5C7DD0E75745C005509DE</string>
<string>B8A5C7DE0E75745C005509DE</string>
<string>B8A5C7DF0E75745C005509DE</string>
<string>B8A5C7E00E75745C005509DE</string>
<string>B8A5C7E10E75745C005509DE</string>
<string>B8A5C7E20E75745C005509DE</string>
<string>B8A5C7E30E75745C005509DE</string>
<string>B8A5C7E40E75745C005509DE</string>
<string>B8A5C7E50E75745C005509DE</string>
<string>B8A5C7E60E75745C005509DE</string>
<string>B8A5C7E70E75745C005509DE</string>
<string>B8A5C7E80E75745C005509DE</string>
<string>B8A5C7E90E75745C005509DE</string>
<string>B8A5C7EA0E75745C005509DE</string>
<string>B8A5C7EB0E75745C005509DE</string>
<string>B8A5C7EC0E75745C005509DE</string>
<string>B8A5C7ED0E75745C005509DE</string>
<string>B8A5C7EE0E75745C005509DE</string>
<string>B8A5C7EF0E75745C005509DE</string>
<string>B8A5C7F00E75745C005509DE</string>
<string>B8A5C7F10E75745C005509DE</string>
<string>B8A5C7F20E75745C005509DE</string>
<string>B8A5C7F30E75745C005509DE</string>
<string>B8A5C7F40E75745C005509DE</string>
<string>B8A5C7F50E75745C005509DE</string>
<string>B8A5C7F60E75745C005509DE</string>
<string>B8A5C8120E7575BA005509DE</string>
<string>B8A5C81D0E757738005509DE</string>
<string>B8A5C81E0E757738005509DE</string>
<string>B8A5C81F0E757738005509DE</string>
<string>B8A5C8200E757738005509DE</string>
<string>B8A5C8210E757738005509DE</string>
<string>B8A5C8220E757738005509DE</string>
<string>B8A5C8230E757738005509DE</string>
<string>B8A5C8240E757738005509DE</string>
<string>B8A5C8250E757738005509DE</string>
<string>B8A5C8260E757738005509DE</string>
<string>B8A5C8270E757738005509DE</string>
<string>B8A5C8280E757738005509DE</string>
<string>B8A5C8290E757738005509DE</string>
<string>B8A5C82A0E757738005509DE</string>
<string>B8A5C83C0E757986005509DE</string>
<string>B8A5C83D0E757986005509DE</string>
<string>B8A5C83E0E757986005509DE</string>
<string>B8A5C83F0E757986005509DE</string>
<string>B8A5C8480E757A06005509DE</string>
<string>B8A5C84D0E757A20005509DE</string>
<string>B8A5C8560E757B48005509DE</string>
<string>B8A5C8570E757B48005509DE</string>
<string>B8A5C8580E757B48005509DE</string>
<string>B8A5C8590E757B48005509DE</string>
<string>B8A5C85A0E757B48005509DE</string>
<string>B8A5C8610E757BC9005509DE</string>
<string>B8A5C86A0E757D29005509DE</string>
<string>B8A5C86B0E757D29005509DE</string>
<string>B8A5C86C0E757D29005509DE</string>
<string>B8A5C86D0E757D29005509DE</string>
<string>B8A5C8A80E7584C5005509DE</string>
<string>B8A5C8D10E7584C5005509DE</string>
<string>B8A5C9540E762E71005509DE</string>
<string>B8A5C9630E762E71005509DE</string>
<string>B8A5C9DC0E763852005509DE</string>
<string>B8A5C9F00E763852005509DE</string>
<string>B8A5CA200E763FD8005509DE</string>
<string>B8A5CA2B0E763FD8005509DE</string>
<string>B8A5CB350E765661005509DE</string>
<string>B8A5CB360E765661005509DE</string>
<string>B8C6AEB30E77997E00C12A12</string>
<string>B8C6B0E80E77C7DF00C12A12</string>
<string>B8C6B1360E790C5C00C12A12</string>
<string>B8C6B13A0E790C5C00C12A12</string>
<string>B8F728A90E7B90F8003277F4</string>
<string>B84845BF0E80A88C005A7BC9</string>
<string>B84845F70E80AFCB005A7BC9</string>
<string>B84845F80E80AFCB005A7BC9</string>
<string>B84845F90E80AFCB005A7BC9</string>
<string>B84845FA0E80AFCB005A7BC9</string>
<string>B84845FB0E80AFCB005A7BC9</string>
<string>B84845FC0E80AFCB005A7BC9</string>
<string>B84845FD0E80AFCB005A7BC9</string>
<string>B84845FE0E80AFCB005A7BC9</string>
<string>B84845FF0E80AFCB005A7BC9</string>
<string>B84846000E80AFCB005A7BC9</string>
<string>B84846010E80AFCB005A7BC9</string>
<string>B84846020E80AFCB005A7BC9</string>
<string>B84846030E80AFCB005A7BC9</string>
<string>B84846040E80AFCB005A7BC9</string>
<string>B84846050E80AFCB005A7BC9</string>
<string>B84846060E80AFCB005A7BC9</string>
<string>B84846070E80AFCB005A7BC9</string>
<string>B84846080E80AFCB005A7BC9</string>
<string>B84846090E80AFCB005A7BC9</string>
<string>B848460A0E80AFCB005A7BC9</string>
<string>B848460B0E80AFCB005A7BC9</string>
<string>B848460C0E80AFCB005A7BC9</string>
<string>B848460D0E80AFCB005A7BC9</string>
<string>B84846150E80AFFC005A7BC9</string>
<string>B848461D0E80B044005A7BC9</string>
<string>B848461E0E80B044005A7BC9</string>
<string>B84846270E80B0A6005A7BC9</string>
<string>B84846280E80B0A6005A7BC9</string>
<string>B84846290E80B0A6005A7BC9</string>
</array>
</dict>
<key>SplitCount</key>
... ... @@ -595,14 +564,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1628, 965}}</string>
<string>{{0, 0}, {1588, 950}}</string>
<key>RubberWindowFrame</key>
<string>7 55 1916 1123 0 0 1920 1178 </string>
<string>6 55 1916 1123 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>965pt</string>
<string>950pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
... ... @@ -615,18 +584,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 970}, {1628, 112}}</string>
<string>{{0, 955}, {1588, 127}}</string>
<key>RubberWindowFrame</key>
<string>7 55 1916 1123 0 0 1920 1178 </string>
<string>6 55 1916 1123 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
<string>112pt</string>
<string>127pt</string>
</dict>
</array>
<key>Proportion</key>
<string>1628pt</string>
<string>1588pt</string>
</dict>
</array>
<key>Name</key>
... ... @@ -641,9 +610,9 @@
</array>
<key>TableOfContents</key>
<array>
<string>B8A5C73A0E756E6E005509DE</string>
<string>B848458F0E7F7E9A005A7BC9</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>B8A5C73B0E756E6E005509DE</string>
<string>B84845900E7F7E9A005A7BC9</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
... ... @@ -777,15 +746,17 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>B8A5C74B0E756E98005509DE</string>
<string>B8A5C7450E756E6E005509DE</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>B8A523490E6E86CE006AA8E2</string>
<string>1C530D57069F1CE1000CFCEE</string>
<string>B84845C70E80A98B005A7BC9</string>
<string>B84845C40E80A88C005A7BC9</string>
<string>B89426BA0E6BE9980080B2F5</string>
<string>/Users/sineltor/src/catchme/Project/RouteMe/RouteMe.xcodeproj</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C78EAAD065D492600B07095</string>
<string>/Users/sineltor/src/catchme/Project/RouteMe/RouteMe.xcodeproj</string>
</array>
<key>WindowString</key>
<string>7 55 1916 1123 0 0 1920 1178 </string>
<string>6 55 1916 1123 0 0 1920 1178 </string>
<key>WindowToolsV3</key>
<array>
<dict>
... ... @@ -801,14 +772,12 @@
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>ScreenProjection.h</string>
<string></string>
<key>StatusBarVisibility</key>
<true/>
</dict>
... ... @@ -817,7 +786,7 @@
<key>Frame</key>
<string>{{0, 0}, {896, 361}}</string>
<key>RubberWindowFrame</key>
<string>2052 415 896 739 1920 300 1440 900 </string>
<string>2377 373 896 739 1920 300 1440 900 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
... ... @@ -841,7 +810,7 @@
<key>Frame</key>
<string>{{0, 366}, {896, 332}}</string>
<key>RubberWindowFrame</key>
<string>2052 415 896 739 1920 300 1440 900 </string>
<string>2377 373 896 739 1920 300 1440 900 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
... ... @@ -864,18 +833,18 @@
<key>TableOfContents</key>
<array>
<string>B89426BA0E6BE9980080B2F5</string>
<string>B8A5C73C0E756E6E005509DE</string>
<string>B84845C10E80A88C005A7BC9</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>2052 415 896 739 1920 300 1440 900 </string>
<string>2377 373 896 739 1920 300 1440 900 </string>
<key>WindowToolGUID</key>
<string>B89426BA0E6BE9980080B2F5</string>
<key>WindowToolIsVisible</key>
<true/>
<false/>
</dict>
<dict>
<key>FirstTimeWindowDisplayed</key>
... ... @@ -906,8 +875,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {871, 577}}</string>
<string>{{871, 0}, {1045, 577}}</string>
<string>{{0, 0}, {870, 497}}</string>
<string>{{870, 0}, {1046, 497}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
... ... @@ -922,8 +891,8 @@
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1916, 577}}</string>
<string>{{0, 577}, {1916, 504}}</string>
<string>{{0, 0}, {1916, 497}}</string>
<string>{{0, 497}, {1916, 434}}</string>
</array>
</dict>
</dict>
... ... @@ -943,7 +912,7 @@
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {1916, 1081}}</string>
<string>{{0, 0}, {1916, 931}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
... ... @@ -953,24 +922,24 @@
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>690</real>
<real>691</real>
</array>
<key>Frame</key>
<string>{{871, 0}, {1045, 577}}</string>
<string>{{870, 0}, {1046, 497}}</string>
<key>RubberWindowFrame</key>
<string>4 56 1916 1122 0 0 1920 1178 </string>
<string>396 206 1916 972 0 0 1920 1178 </string>
</dict>
<key>RubberWindowFrame</key>
<string>4 56 1916 1122 0 0 1920 1178 </string>
<string>396 206 1916 972 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>1081pt</string>
<string>931pt</string>
</dict>
</array>
<key>Proportion</key>
<string>1081pt</string>
<string>931pt</string>
</dict>
</array>
<key>Name</key>
... ... @@ -984,26 +953,30 @@
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>B8A5C73D0E756E6E005509DE</string>
<string>B84845910E7F7E9A005A7BC9</string>
<string>1C162984064C10D400B95A72</string>
<string>B8A5C73E0E756E6E005509DE</string>
<string>B8A5C73F0E756E6E005509DE</string>
<string>B8A5C7400E756E6E005509DE</string>
<string>B8A5C7410E756E6E005509DE</string>
<string>B8A5C7420E756E6E005509DE</string>
<string>B84845920E7F7E9A005A7BC9</string>
<string>B84845930E7F7E9A005A7BC9</string>
<string>B84845940E7F7E9A005A7BC9</string>
<string>B84845950E7F7E9A005A7BC9</string>
<string>B84845960E7F7E9A005A7BC9</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>4 56 1916 1122 0 0 1920 1178 </string>
<string>396 206 1916 972 0 0 1920 1178 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<false/>
<true/>
</dict>
<dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>windowTool.find</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
... ... @@ -1013,44 +986,34 @@
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string>&lt;No Editor&gt;</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<string>TiledLayerController.m</string>
<key>StatusBarVisibility</key>
<integer>1</integer>
<true/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<string>{{0, 0}, {971, 746}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
<string>897 31 971 1085 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
<string>971pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
<string>746pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
... ... @@ -1061,18 +1024,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<string>{{0, 751}, {971, 293}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
<string>897 31 971 1085 0 0 1920 1178 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
<string>293pt</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
<string>1044pt</string>
</dict>
</array>
<key>Name</key>
... ... @@ -1082,23 +1045,21 @@
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<true/>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>B84845DF0E80ACDE005A7BC9</string>
<string>B84845E00E80ACDE005A7BC9</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<string>897 31 971 1085 0 0 1920 1178 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
<false/>
</dict>
<dict>
<key>Identifier</key>
... ... @@ -1131,7 +1092,7 @@
<key>Frame</key>
<string>{{0, 0}, {981, 712}}</string>
<key>RubberWindowFrame</key>
<string>2289 447 981 753 1920 300 1440 900 </string>
<string>2212 423 981 753 1920 300 1440 900 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
... ... @@ -1154,13 +1115,13 @@
<key>TableOfContents</key>
<array>
<string>1C78EAAD065D492600B07095</string>
<string>B8A5C7430E756E6E005509DE</string>
<string>B84845C20E80A88C005A7BC9</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>2289 447 981 753 1920 300 1440 900 </string>
<string>2212 423 981 753 1920 300 1440 900 </string>
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
... ... @@ -1653,7 +1614,7 @@
<key>TableOfContents</key>
<array>
<string>B8A523490E6E86CE006AA8E2</string>
<string>B8A5234A0E6E86CE006AA8E2</string>
<string>B848460F0E80AFCB005A7BC9</string>
<string>B8A523480E6E86CE006AA8E2</string>
</array>
<key>WindowString</key>
... ...
This diff could not be displayed because it is too large.
... ... @@ -18,6 +18,8 @@ extern NSString * const MapImageLoadingCancelledNotification;
@interface TileImage : NSObject {
UIImage *image;
// CGImageRef image;
// I know this is a bit nasty.
Tile tile;
... ... @@ -44,6 +46,9 @@ extern NSString * const MapImageLoadingCancelledNotification;
- (void)drawInRect:(CGRect)rect;
- (void)draw;
- (void)moveBy: (CGSize) delta;
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
- (void)makeLayer;
-(void) cancelLoading;
... ... @@ -52,5 +57,7 @@ extern NSString * const MapImageLoadingCancelledNotification;
@property (readwrite, assign) CGRect screenLocation;
@property (readonly, assign) Tile tile;
@property (readonly) CALayer *layer;
@property (readonly) UIImage *image;
@end
... ...
... ... @@ -11,13 +11,15 @@
#import "TileLoader.h"
#import "FileTileImage.h"
#import "TileCache.h"
#import "MathUtils.h"
#import <QuartzCore/QuartzCore.h>
NSString * const MapImageLoadedNotification = @"MapImageLoaded";
NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancelled";
@implementation TileImage
@synthesize screenLocation, tile;
@synthesize tile, layer, image;
- (id) initBlankTile: (Tile)_tile
{
... ... @@ -75,7 +77,12 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
// if (image)
// CGImageRelease(image);
[image release];
[super dealloc];
}
/*
... ... @@ -95,7 +102,14 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
- (void)drawInRect:(CGRect)rect
{
[image drawInRect:rect];
// [image drawAtPoint:rect.origin];
/* if (image != NULL)
{
CGContextRef context = UIGraphicsGetCurrentContext();
NSLog(@"image width = %f", CGImageGetWidth(image));
// CGContextClipToRect(context, rect);
CGContextDrawImage(context, rect, image);
}*/
}
-(void)draw
... ... @@ -103,11 +117,6 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
[self drawInRect:screenLocation];
}
- (void)makeLayer
{
layer = [CALayer layer];
}
+ (TileImage*)imageWithTile: (Tile) _tile FromURL: (NSString*)url
{
return [[[WebTileImage alloc] initWithTile:_tile FromURL:url] autorelease];
... ... @@ -133,8 +142,17 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
{
// CGContextRef context =
CGImageRef cgImage = CGImageCreateWithPNGDataProvider(CGDataProviderCreateWithCFData ((CFDataRef)data), NULL, FALSE, kCGRenderingIntentDefault);
// CGImageRetain(image);
image = [[UIImage imageWithCGImage:cgImage] retain];
if (layer == nil)
{
image = [[UIImage imageWithCGImage:cgImage] retain];
}
else
{
NSLog(@"Replacing image contents with data");
layer.contents = (id)cgImage;
}
NSDictionary *d = [NSDictionary dictionaryWithObject:data forKey:@"data"];
[[NSNotificationCenter defaultCenter] postNotificationName:MapImageLoadedNotification
... ... @@ -155,4 +173,51 @@ NSString * const MapImageLoadingCancelledNotification = @"MapImageLoadingCancell
return TilesEqual(tile, [(TileImage*)anObject tile]);
}
- (void)makeLayer
{
if (layer == nil)
{
layer = [[CALayer alloc] init];
layer.contents = nil;
layer.anchorPoint = CGPointMake(0.0f, 0.0f);
layer.bounds = CGRectMake(0, 0, screenLocation.size.width, screenLocation.size.height);
layer.position = screenLocation.origin;
}
if (image != nil)
{
layer.contents = (id)[image CGImage];
[image release];
image = nil;
}
}
- (void)moveBy: (CGSize) delta
{
self.screenLocation = TranslateCGRectBy(screenLocation, delta);
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
self.screenLocation = ScaleCGRectAboutPoint(screenLocation, zoomFactor, center);
}
- (CGRect) screenLocation
{
return screenLocation;
}
- (void) setScreenLocation: (CGRect)newScreenLocation
{
// NSLog(@"location moving from %f %f to %f %f", screenLocation.origin.x, screenLocation.origin.y, newScreenLocation.origin.x, newScreenLocation.origin.y);
screenLocation = newScreenLocation;
if (layer != nil)
{
// layer.frame = screenLocation;
layer.position = screenLocation.origin;
layer.bounds = CGRectMake(0, 0, screenLocation.size.width, screenLocation.size.height);
}
}
@end
... ...
... ... @@ -82,6 +82,11 @@
{
image.screenLocation = screenLocation;
[images addObject:image];
if (!TileIsDummy(image.tile) && [delegate respondsToSelector:@selector(tileAdded:WithImage:)])
{
[delegate tileAdded:tile WithImage:image];
}
}
-(void) addTile: (Tile) tile At: (CGRect) screenLocation
... ... @@ -175,9 +180,7 @@
{
for (TileImage *image in images)
{
CGRect location = image.screenLocation;
location = TranslateCGRectBy(location, delta);
image.screenLocation = location;
[image moveBy: delta];
}
}
... ... @@ -185,9 +188,7 @@
{
for (TileImage *image in images)
{
CGRect location = image.screenLocation;
location = ScaleCGRectAboutPoint(location, zoomFactor, center);
image.screenLocation = location;
[image zoomByFactor:zoomFactor Near:center];
}
}
... ...
... ... @@ -42,6 +42,7 @@ extern NSString * const MapImageRemovedFromScreenNotification;
//-(void) setNeedsRedraw;
//-(BOOL) needsRedraw;
-(void) assemble;
- (void)moveBy: (CGSize) delta;
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center;
... ...
... ... @@ -53,7 +53,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
screenProjection = [screen retain];
tileSource = [source retain];
return self;
}
... ... @@ -76,8 +76,25 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
-(BOOL) screenIsLoaded
{
return CGRectContainsRect(loadedBounds, [screenProjection screenBounds])
&& loadedZoom == [[tileSource tileProjection] calculateZoomFromScale:[screenProjection scale]];
// return CGRectContainsRect(loadedBounds, [screenProjection screenBounds])
// && loadedZoom == [[tileSource tileProjection] calculateNormalisedZoomFromScale:[screenProjection scale]];
BOOL contained = CGRectContainsRect(loadedBounds, [screenProjection screenBounds]);
float targetZoom = [[tileSource tileProjection] calculateNormalisedZoomFromScale:[screenProjection scale]];
// && loadedZoom == ;
if (contained == NO)
{
NSLog(@"reassembling because its not contained");
}
if (targetZoom != loadedZoom)
{
NSLog(@"reassembling because target zoom = %f, loaded zoom = %d", targetZoom, loadedZoom);
}
return contained && targetZoom == loadedZoom;
}
-(void) tileRemoved: (Tile) tile
... ... @@ -91,6 +108,11 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
// [[NSNotificationCenter defaultCenter] postNotificationName:MapImageRemovedFromScreenNotification object:[NSValue valueWithBytes:&tile objCType:@encode(Tile)]];
}
-(CGRect) currentRendererBounds
{
return [screenProjection screenBounds];
}
-(void) assemble
{
if ([self screenIsLoaded])
... ... @@ -104,7 +126,7 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
FractalTileProjection *tileProjection = [tileSource tileProjection];
TileRect newTileRect = [tileProjection project:screenProjection];
CGRect newLoadedBounds = [images addTiles:newTileRect ToDisplayIn:[screenProjection screenBounds]];
CGRect newLoadedBounds = [images addTiles:newTileRect ToDisplayIn:[self currentRendererBounds]];
if (!TileIsDummy(loadedTiles.origin.tile))
[images removeTiles:loadedTiles];
... ... @@ -120,12 +142,14 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
{
[images moveBy:delta];
loadedBounds = TranslateCGRectBy(loadedBounds, delta);
// [self assemble];
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
[images zoomByFactor:zoomFactor Near:center];
loadedBounds = ScaleCGRectAboutPoint(loadedBounds, zoomFactor, center);
// [self assemble];
}
-(BOOL) containsRect: (CGRect)bounds
... ... @@ -135,8 +159,8 @@ NSString* const MapImageRemovedFromScreenNotification = @"MapImageRemovedFromScr
-(void) draw
{
[self assemble];
// [self assemble];
[images draw];
}
... ...
... ... @@ -18,23 +18,14 @@
{
if (![super init])
return nil;
/* viewSize = size;
topLeft.x = 0;
topLeft.y = 0;
*/
tileSource = _tileSource;
[tileSource retain];
FractalTileProjection *tileProjection = [tileSource tileProjection];
layer = [CATiledLayer layer];
layer.delegate = self;
/*
[CATransaction begin];
[CATransaction setValue:[NSNumber numberWithFloat:0.0f]
forKey:kCATransactionAnimationDuration];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
*/
layer.levelsOfDetail = tileProjection.maxZoom + 1; // check this.
layer.levelsOfDetailBias = 1; // Allows zoom level 0.
... ... @@ -45,10 +36,6 @@
layer.position = CGPointMake(0, 0);
[self setScale:1];
// tiledLayer.transform = CATransform3DIdentity;
// [CATransaction commit];
[layer setNeedsDisplay];
return self;
... ...
... ... @@ -8,6 +8,7 @@
#import "WebTileImage.h"
#import "TileProxy.h"
#import <QuartzCore/CALayer.h>
@implementation WebTileImage
... ... @@ -82,6 +83,17 @@
[super cancelLoading];
}
- (void)makeLayer
{
[super makeLayer];
if (image == nil
&& layer != nil
&& layer.contents == nil)
{
layer.contents = (id)[[proxy image] CGImage];
}
}
- (void)drawInRect:(CGRect)rect
{
if (image)
... ...