Authored by Justin R. Miller

more tile cache key instance fixes

... ... @@ -33,6 +33,7 @@
{
NSString *_mapsKey;
NSString *_imageURLString;
NSString *_uniqueTilecacheKey;
RMBingImagerySet _imagerySet;
}
... ... @@ -49,6 +50,8 @@
_imagerySet = imagerySet;
_uniqueTilecacheKey = [NSString stringWithFormat:@"Bing%lu", (unsigned long)_imagerySet];
self.minZoom = 1;
self.maxZoom = 21;
... ... @@ -123,7 +126,7 @@
- (NSString *)uniqueTilecacheKey
{
return [NSString stringWithFormat:@"Bing%lu", (unsigned long)_imagerySet];
return _uniqueTilecacheKey;
}
- (NSString *)shortName
... ...
... ... @@ -42,6 +42,7 @@
@implementation RMMBTilesSource
{
RMFractalTileProjection *tileProjection;
NSString *_uniqueTilecacheKey;
}
@synthesize cacheable = _cacheable, opaque = _opaque;
... ... @@ -71,6 +72,8 @@
if ( ! queue)
return nil;
_uniqueTilecacheKey = [NSString stringWithFormat:@"MBTiles%@", [queue.path lastPathComponent]];
[queue inDatabase:^(FMDatabase *db) {
[db setShouldCacheStatements:YES];
}];
... ... @@ -330,7 +333,7 @@
- (NSString *)uniqueTilecacheKey
{
return [NSString stringWithFormat:@"MBTiles%@", [queue.path lastPathComponent]];
return _uniqueTilecacheKey;
}
- (NSString *)shortName
... ...
... ... @@ -41,7 +41,7 @@
@property (nonatomic, strong) NSDictionary *infoDictionary;
@property (nonatomic, strong) NSString *tileJSON;
@property (nonatomic, strong) NSString *cacheKey;
@property (nonatomic, strong) NSString *uniqueTilecacheKey;
@end
... ... @@ -49,7 +49,7 @@
@implementation RMMapboxSource
@synthesize infoDictionary=_infoDictionary, tileJSON=_tileJSON, imageQuality=_imageQuality, dataQueue=_dataQueue;
@synthesize infoDictionary=_infoDictionary, tileJSON=_tileJSON, imageQuality=_imageQuality, dataQueue=_dataQueue, uniqueTilecacheKey=_uniqueTilecacheKey;
- (id)init
{
... ... @@ -85,7 +85,7 @@
_tileJSON = tileJSON;
_cacheKey = [NSString stringWithFormat:@"Mapbox-%@%@", [_infoDictionary objectForKey:@"id"], ([_infoDictionary objectForKey:@"version"] ? [@"-" stringByAppendingString:[_infoDictionary objectForKey:@"version"]] : @"")];
_uniqueTilecacheKey = [NSString stringWithFormat:@"Mapbox-%@%@", [_infoDictionary objectForKey:@"id"], ([_infoDictionary objectForKey:@"version"] ? [@"-" stringByAppendingString:[_infoDictionary objectForKey:@"version"]] : @"")];
id dataObject = nil;
... ... @@ -355,7 +355,7 @@
- (NSString *)uniqueTilecacheKey
{
return self.cacheKey;
return self.uniqueTilecacheKey;
}
- (NSString *)shortName
... ...