RMTileCache Protocol Reference
Conforms to | NSObject |
Declared in | RMTileCache.h |
Tasks
Querying the Cache
-
– cachedImage:withCacheKey:
required method -
– cachedImage:withCacheKey:bypassingMemoryCache:
required method
Adding to the Cache
Clearing the Cache
Instance Methods
addDiskCachedImageData:forTile:withCacheKey:
Adds tile image data to the specified cache, bypassing the memory cache and only writing to disk. This is useful for instances where many tiles are downloaded directly to disk for later use offline.
- (void)addDiskCachedImageData:(NSData *)data forTile:(RMTile)tile withCacheKey:(NSString *)cacheKey
Parameters
- data
The tile image data to be cached.
- tile
The RMTile describing the map location of the image.
- cacheKey
The key representing a certain cache.
Discussion
Adds tile image data to the specified cache, bypassing the memory cache and only writing to disk. This is useful for instances where many tiles are downloaded directly to disk for later use offline.
Declared In
RMTileCache.h
addImage:forTile:withCacheKey:
Adds a tile image to the specified cache.
- (void)addImage:(UIImage *)image forTile:(RMTile)tile withCacheKey:(NSString *)cacheKey
Parameters
- image
A tile image to be cached.
- tile
The RMTile describing the map location of the image.
- cacheKey
The key representing a certain cache.
Discussion
Adds a tile image to the specified cache.
Declared In
RMTileCache.h
cachedImage:withCacheKey:
Returns an image from the cache if it exists.
- (UIImage *)cachedImage:(RMTile)tile withCacheKey:(NSString *)cacheKey
Parameters
- tile
A desired RMTile.
- cacheKey
The key representing a certain cache.
Return Value
An image of the tile that can be used to draw a portion of the map.
Discussion
Returns an image from the cache if it exists.
Declared In
RMTileCache.h
cachedImage:withCacheKey:bypassingMemoryCache:
Returns an image from the cache if it exists.
- (UIImage *)cachedImage:(RMTile)tile withCacheKey:(NSString *)cacheKey bypassingMemoryCache:(BOOL)shouldBypassMemoryCache
Parameters
- tile
A desired RMTile.
- cacheKey
The key representing a certain cache.
- shouldBypassMemoryCache
Whether to only consult disk-based caches.
Return Value
An image of the tile that can be used to draw a portion of the map.
Discussion
Returns an image from the cache if it exists.
Declared In
RMTileCache.h