Authored by Justin R. Miller

fixes #244: 'version' TileJSON key is only present for TileMill maps

@@ -352,7 +352,7 @@ @@ -352,7 +352,7 @@
352 352
353 - (NSString *)uniqueTilecacheKey 353 - (NSString *)uniqueTilecacheKey
354 { 354 {
355 - return [NSString stringWithFormat:@"Mapbox-%@-%@", [self.infoDictionary objectForKey:@"id"], [self.infoDictionary objectForKey:@"version"]]; 355 + return [NSString stringWithFormat:@"Mapbox-%@%@", [self.infoDictionary objectForKey:@"id"], ([self.infoDictionary objectForKey:@"version"] ? [@"-" stringByAppendingString:[self.infoDictionary objectForKey:@"version"]] : @"")];
356 } 356 }
357 357
358 - (NSString *)shortName 358 - (NSString *)shortName