Skip to content

Commit

Permalink
Restore loadingTile functionality - issue route-me#69
Browse files Browse the repository at this point in the history
  • Loading branch information
tracyharton committed Mar 5, 2012
1 parent 749073e commit f9002b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions MapView/Map/RMTileProxy.h
Expand Up @@ -36,6 +36,7 @@
}

+(UIImage*) errorTile;
+(UIImage*) loadingTile;
+(UIImage*) missingTile;

@end
9 changes: 9 additions & 0 deletions MapView/Map/RMTileProxy.m
Expand Up @@ -30,6 +30,7 @@
@implementation RMTileProxy

static UIImage *_errorTile = nil;
static UIImage *_loadingTile = nil;
static UIImage *_missingTile = nil;

+ (UIImage*) errorTile
Expand All @@ -40,6 +41,14 @@ + (UIImage*) errorTile
return _errorTile;
}

+ (UIImage*) loadingTile
{
if (_loadingTile) return _loadingTile;

_loadingTile = [[UIImage imageNamed:@"loading.png"] retain];
return _loadingTile;
}

+ (UIImage*) missingTile
{
if (_missingTile) return _missingTile;
Expand Down
3 changes: 3 additions & 0 deletions MapView/Map/RMWebTileImage.m
Expand Up @@ -49,6 +49,9 @@ - (id) initWithTile: (RMTile)_tile FromURL:(NSString*)urlStr
{
if (![super initWithTile:_tile])
return nil;

[super displayProxy:[RMTileProxy loadingTile]];


url = [[NSURL alloc] initWithString:urlStr];

Expand Down

0 comments on commit f9002b5

Please sign in to comment.