Authored by Justin R. Miller

properly set layer scale for MapBox markers

... ... @@ -144,12 +144,12 @@
NSString *cachePath = [NSString stringWithFormat:@"%@/%@", kCachesPath, [imageURL lastPathComponent]];
if ((image = [UIImage imageWithContentsOfFile:cachePath]) && image)
if ((image = [UIImage imageWithData:[NSData dataWithContentsOfFile:cachePath] scale:(useRetina ? 2.0 : 1.0)]) && image)
return [self initWithUIImage:image];
[[NSFileManager defaultManager] createFileAtPath:cachePath contents:[NSData dataWithContentsOfURL:imageURL] attributes:nil];
return [self initWithUIImage:[UIImage imageWithContentsOfFile:cachePath]];
return [self initWithUIImage:[UIImage imageWithData:[NSData dataWithContentsOfFile:cachePath] scale:(useRetina ? 2.0 : 1.0)]];
}
- (void)dealloc
... ...