MaplyTileSecondChance
Objective-C
@protocol MaplyTileSecondChance <NSObject>
Swift
protocol MaplyTileSecondChance : NSObjectProtocol
If a tile fetch request fails, this object allows you second change to provide the data. Maybe you have an old version in a cache somewhere. Provide that. Or fail and the tile fetch will continue to fail.
-
Return data for a tile that’s already failed to load from local cache and remote fetch. This might be an old version of the data you have lying around. It’s up to you. Returning nil means the fetch fails as normal.
Declaration
Objective-C
- (NSData *_Nullable)dataForTile:(MaplyRemoteTileFetchInfo *_Nonnull)fetchInfo tileID:(MaplyTileID)tileID;
Swift
func data(forTile fetchInfo: MaplyRemoteTileFetchInfo, tileID: MaplyTileID) -> Data?