-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAppDelegate.m
53 lines (38 loc) · 1007 Bytes
/
AppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// AppDelegate.m
// TileMap
//
// Created by Nathan Vander Wilt on 8/12/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "AppDelegate.h"
#import "TLMapView.h"
#import "TLMapSimpleLayer.h"
#import "TLMapTileLayer.h"
#import "TLMapNavigationLayer.h"
@interface NSObject (TLAdditions)
+ (id)tl_make;
@end
@implementation AppDelegate
@synthesize map;
- (void)awakeFromNib {
[self.map addMapLayer:[TLMapTileLayer tl_make]];
//[self.map addMapLayer:[TLMapSimpleLayer tl_make]];
[self.map addMapLayer:[TLMapNavigationLayer tl_make]];
self.map.desiredBounds = [TLMapSimpleLayer fakeProjectShape:[TLMapSimpleLayer worldBounds]
withProjection:(map.projection)];
}
- (void)dealloc {
[map release];
[super dealloc];
}
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication {
(void)theApplication;
return YES;
}
@end
@implementation NSObject (TLAdditions)
+ (id)tl_make {
return [[[self class] new] autorelease];
}
@end