Conforms to NSObject
Declared in RMTileCache.h

Overview

The RMTileCache protocol describes behaviors that tile caches should implement.

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

removeAllCachedImages

Removes all tile images from a cache.

- (void)removeAllCachedImages

Discussion

Removes all tile images from a cache.

Declared In

RMTileCache.h