Showing
3 changed files
with
19 additions
and
20 deletions
@@ -145,10 +145,10 @@ enum { | @@ -145,10 +145,10 @@ enum { | ||
145 | @property (readonly) RMTileLoader *tileLoader; | 145 | @property (readonly) RMTileLoader *tileLoader; |
146 | 146 | ||
147 | @property (readonly) RMProjection *projection; | 147 | @property (readonly) RMProjection *projection; |
148 | -@property (readonly) id<RMMercatorToTileProjection> mercatorToTileProjection; | 148 | +@property (readonly) id <RMMercatorToTileProjection> mercatorToTileProjection; |
149 | @property (readonly) RMMercatorToScreenProjection *mercatorToScreenProjection; | 149 | @property (readonly) RMMercatorToScreenProjection *mercatorToScreenProjection; |
150 | 150 | ||
151 | -@property (retain, readwrite) id<RMTileSource> tileSource; | 151 | +@property (retain, readwrite) id <RMTileSource> tileSource; |
152 | @property (nonatomic, retain) RMTileCache *tileCache; | 152 | @property (nonatomic, retain) RMTileCache *tileCache; |
153 | @property (retain, readwrite) RMMapRenderer *renderer; | 153 | @property (retain, readwrite) RMMapRenderer *renderer; |
154 | 154 | ||
@@ -158,21 +158,21 @@ enum { | @@ -158,21 +158,21 @@ enum { | ||
158 | @property (retain, readwrite) RMLayerCollection *overlay; | 158 | @property (retain, readwrite) RMLayerCollection *overlay; |
159 | @property (retain, readonly) RMMarkerManager *markerManager; | 159 | @property (retain, readonly) RMMarkerManager *markerManager; |
160 | /// \bug probably shouldn't be retaining this delegate | 160 | /// \bug probably shouldn't be retaining this delegate |
161 | -@property (nonatomic, retain) id<RMTilesUpdateDelegate> tilesUpdateDelegate; | 161 | +@property (nonatomic, retain) id <RMTilesUpdateDelegate> tilesUpdateDelegate; |
162 | @property (readwrite) NSUInteger boundingMask; | 162 | @property (readwrite) NSUInteger boundingMask; |
163 | /// The denominator in a cartographic scale like 1/24000, 1/50000, 1/2000000. | 163 | /// The denominator in a cartographic scale like 1/24000, 1/50000, 1/2000000. |
164 | -@property (readonly)double scaleDenominator; | 164 | +@property (readonly) double scaleDenominator; |
165 | 165 | ||
166 | // tileDepth defaults to zero. if tiles have no alpha, set this higher, 3 or so, to make zooming smoother | 166 | // tileDepth defaults to zero. if tiles have no alpha, set this higher, 3 or so, to make zooming smoother |
167 | @property (readwrite, assign) short tileDepth; | 167 | @property (readwrite, assign) short tileDepth; |
168 | @property (readonly, assign) BOOL fullyLoaded; | 168 | @property (readonly, assign) BOOL fullyLoaded; |
169 | 169 | ||
170 | -- (id)initWithView: (UIView*) view; | ||
171 | -- (id)initWithView: (UIView*) view | ||
172 | - tilesource:(id<RMTileSource>)newTilesource; | 170 | +- (id)initWithView:(UIView *)view; |
171 | +- (id)initWithView:(UIView *)view | ||
172 | + tilesource:(id <RMTileSource>)newTilesource; | ||
173 | /// designated initializer | 173 | /// designated initializer |
174 | -- (id)initWithView:(UIView*)view | ||
175 | - tilesource:(id<RMTileSource>)tilesource | 174 | +- (id)initWithView:(UIView *)view |
175 | + tilesource:(id <RMTileSource>)tilesource | ||
176 | centerLatLon:(CLLocationCoordinate2D)initialCenter | 176 | centerLatLon:(CLLocationCoordinate2D)initialCenter |
177 | zoomLevel:(float)initialZoomLevel | 177 | zoomLevel:(float)initialZoomLevel |
178 | maxZoomLevel:(float)maxZoomLevel | 178 | maxZoomLevel:(float)maxZoomLevel |
@@ -184,7 +184,7 @@ enum { | @@ -184,7 +184,7 @@ enum { | ||
184 | - (void)handleMemoryWarningNotification:(NSNotification *)notification; | 184 | - (void)handleMemoryWarningNotification:(NSNotification *)notification; |
185 | - (void)didReceiveMemoryWarning; | 185 | - (void)didReceiveMemoryWarning; |
186 | 186 | ||
187 | -- (BOOL)tileSourceBoundsContainProjectedPoint:(RMProjectedPoint) point; | 187 | +- (BOOL)tileSourceBoundsContainProjectedPoint:(RMProjectedPoint)point; |
188 | 188 | ||
189 | - (void)moveBy:(CGSize)delta; | 189 | - (void)moveBy:(CGSize)delta; |
190 | - (void)moveBy:(CGSize)delta andCorrectAllSublayers:(BOOL)correctAllSublayers; | 190 | - (void)moveBy:(CGSize)delta andCorrectAllSublayers:(BOOL)correctAllSublayers; |
@@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
76 | 76 | ||
77 | #pragma mark Initialisation | 77 | #pragma mark Initialisation |
78 | 78 | ||
79 | -- (id)initWithView: (UIView*) view | 79 | +- (id)initWithView:(UIView *)view |
80 | { | 80 | { |
81 | LogMethod(); | 81 | LogMethod(); |
82 | CLLocationCoordinate2D here; | 82 | CLLocationCoordinate2D here; |
@@ -92,8 +92,8 @@ | @@ -92,8 +92,8 @@ | ||
92 | backgroundImage:nil]; | 92 | backgroundImage:nil]; |
93 | } | 93 | } |
94 | 94 | ||
95 | -- (id)initWithView: (UIView*) view | ||
96 | - tilesource:(id<RMTileSource>)newTilesource | 95 | +- (id)initWithView:(UIView *)view |
96 | + tilesource:(id <RMTileSource>)newTilesource | ||
97 | { | 97 | { |
98 | LogMethod(); | 98 | LogMethod(); |
99 | CLLocationCoordinate2D here; | 99 | CLLocationCoordinate2D here; |
@@ -109,8 +109,8 @@ | @@ -109,8 +109,8 @@ | ||
109 | backgroundImage:nil]; | 109 | backgroundImage:nil]; |
110 | } | 110 | } |
111 | 111 | ||
112 | -- (id)initWithView:(UIView*)newView | ||
113 | - tilesource:(id<RMTileSource>)newTilesource | 112 | +- (id)initWithView:(UIView *)newView |
113 | + tilesource:(id <RMTileSource>)newTilesource | ||
114 | centerLatLon:(CLLocationCoordinate2D)initialCenter | 114 | centerLatLon:(CLLocationCoordinate2D)initialCenter |
115 | zoomLevel:(float)initialZoomLevel | 115 | zoomLevel:(float)initialZoomLevel |
116 | maxZoomLevel:(float)maxZoomLevel | 116 | maxZoomLevel:(float)maxZoomLevel |
@@ -144,7 +144,6 @@ | @@ -144,7 +144,6 @@ | ||
144 | layer = [[newView layer] retain]; | 144 | layer = [[newView layer] retain]; |
145 | 145 | ||
146 | [self setTileCache:[[[RMTileCache alloc] init] autorelease]]; | 146 | [self setTileCache:[[[RMTileCache alloc] init] autorelease]]; |
147 | - | ||
148 | [self setTileSource:newTilesource]; | 147 | [self setTileSource:newTilesource]; |
149 | [self setRenderer: [[[RMCoreAnimationRenderer alloc] initWithContent:self] autorelease]]; | 148 | [self setRenderer: [[[RMCoreAnimationRenderer alloc] initWithContent:self] autorelease]]; |
150 | 149 | ||
@@ -222,7 +221,7 @@ | @@ -222,7 +221,7 @@ | ||
222 | [self didReceiveMemoryWarning]; | 221 | [self didReceiveMemoryWarning]; |
223 | } | 222 | } |
224 | 223 | ||
225 | -- (void) didReceiveMemoryWarning | 224 | +- (void)didReceiveMemoryWarning |
226 | { | 225 | { |
227 | LogMethod(); | 226 | LogMethod(); |
228 | [tileSource didReceiveMemoryWarning]; | 227 | [tileSource didReceiveMemoryWarning]; |
@@ -231,7 +230,7 @@ | @@ -231,7 +230,7 @@ | ||
231 | 230 | ||
232 | #pragma mark Tile Source Bounds | 231 | #pragma mark Tile Source Bounds |
233 | 232 | ||
234 | -- (BOOL) projectedBounds:(RMProjectedRect)bounds containsPoint:(RMProjectedPoint)point | 233 | +- (BOOL)projectedBounds:(RMProjectedRect)bounds containsPoint:(RMProjectedPoint)point |
235 | { | 234 | { |
236 | if (bounds.origin.easting > point.easting || | 235 | if (bounds.origin.easting > point.easting || |
237 | bounds.origin.easting + bounds.size.width < point.easting || | 236 | bounds.origin.easting + bounds.size.width < point.easting || |
@@ -622,7 +621,7 @@ | @@ -622,7 +621,7 @@ | ||
622 | [tileLoader reload]; | 621 | [tileLoader reload]; |
623 | } | 622 | } |
624 | 623 | ||
625 | -- (id<RMTileSource>)tileSource | 624 | +- (id <RMTileSource>)tileSource |
626 | { | 625 | { |
627 | return [[tileSource retain] autorelease]; | 626 | return [[tileSource retain] autorelease]; |
628 | } | 627 | } |
@@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
69 | { | 69 | { |
70 | [marker setAffineTransform:rotationTransform]; | 70 | [marker setAffineTransform:rotationTransform]; |
71 | [marker setProjectedLocation:[[mapContents projection] coordinateToProjectedPoint:point]]; | 71 | [marker setProjectedLocation:[[mapContents projection] coordinateToProjectedPoint:point]]; |
72 | - [marker setPosition:[[mapContents mercatorToScreenProjection] projectProjectedPoint:[[mapContents projection] coordinateToProjectedPoint:point]]]; | 72 | + [marker setPosition:[[mapContents mercatorToScreenProjection] projectProjectedPoint:[marker projectedLocation]]]; |
73 | [[mapContents overlay] addSublayer:marker]; | 73 | [[mapContents overlay] addSublayer:marker]; |
74 | } | 74 | } |
75 | 75 |
-
Please register or login to post a comment