RMLayerSet.m
1.03 KB
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
54
55
56
57
58
59
60
//
// RMLayerSet.m
// MapView
//
// Created by Joseph Gentle on 1/10/08.
// Copyright 2008 __MyCompanyName__. All rights reserved.
//
#import "RMLayerSet.h"
@implementation RMLayerSet
- (id) init
{
if (![super init])
return nil;
container = [[CALayer alloc] init];
return self;
}
/*
- (void)insertSublayer:(RMMapLayer*) layer below:(RMMapLayer*)sibling;
- (void)insertSublayer:(RMMapLayer*) layer above:(RMMapLayer*)sibling;
- (void)removeSublayer:(RMMapLayer*) layer;
- (void)moveToMercator: (RMMercatorPoint)mercator;
*/
- (void)moveBy: (CGSize) delta
{
for (id layer in layers)
{
if ([layer respondsToSelector:@selector(moveBy:)])
[layer moveBy:delta];
}
}
- (void)zoomByFactor: (float) zoomFactor Near:(CGPoint) center
{
for (id layer in layers)
{
if ([layer respondsToSelector:@selector(zoomByFactor:Near:)])
[layer zoomByFactor:zoomFactor Near:center];
}
}
-(CALayer*) layer
{
return container;
}
-(void) drawRect: (CGRect)rect
{
NSLog(@"Map layers not currently supported using quartz renderer");
}
@end