RMTileCacheBackgroundDelegate Protocol Reference
Conforms to | NSObject |
Declared in | RMTileCache.h |
Overview
The RMTileCacheBackgroundDelegate protocol is for receiving notifications about background tile cache download operations.
These callbacks are not guaranteed to be received on the main thread, so if you intend to do work in the user interface, you should properly enqueue such jobs on the main thread.
Instance Methods
tileCache:didBackgroundCacheTile:withIndex:ofTotalTileCount:
Sent upon caching of each tile in a background cache operation.
- (void)tileCache:(RMTileCache *)tileCache didBackgroundCacheTile:(RMTile)tile withIndex:(NSUInteger)tileIndex ofTotalTileCount:(NSUInteger)totalTileCount
Parameters
- tileCache
The tile cache.
- tile
A structure representing the tile in question.
- tileIndex
The index of the tile in question, beginning with
1
and ending with totalTileCount.
- totalTileCount
The total number of of tiles required for coverage of the desired geographic area.
Discussion
Sent upon caching of each tile in a background cache operation.
Declared In
RMTileCache.h
tileCache:didBeginBackgroundCacheWithCount:forTileSource:
Sent when the background caching operation begins.
- (void)tileCache:(RMTileCache *)tileCache didBeginBackgroundCacheWithCount:(NSUInteger)tileCount forTileSource:(id<RMTileSource>)tileSource
Parameters
- tileCache
The tile cache.
- tileCount
The total number of tiles required for coverage of the desired geographic area.
- tileSource
The tile source providing the tiles.
Discussion
Sent when the background caching operation begins.
Declared In
RMTileCache.h
tileCache:didReceiveError:whenCachingTile:
Sent upon error when trying to cache a tile in a background cache operation.
- (void)tileCache:(RMTileCache *)tileCache didReceiveError:(NSError *)error whenCachingTile:(RMTile)tile
Parameters
- tileCache
The tile cache.
- error
The error received.
- tile
A structure representing the tile in question.
Discussion
Sent upon error when trying to cache a tile in a background cache operation.
Declared In
RMTileCache.h
tileCacheDidCancelBackgroundCache:
Sent when the cache download operation has completed cancellation and the cache object is safe to dispose of.
- (void)tileCacheDidCancelBackgroundCache:(RMTileCache *)tileCache
Parameters
- tileCache
The tile cache.
Discussion
Sent when the cache download operation has completed cancellation and the cache object is safe to dispose of.
Declared In
RMTileCache.h