MaplyRemoteTileFetcher
Objective-C
@interface MaplyRemoteTileFetcher : NSObject <MaplyTileFetcher>
Swift
class MaplyRemoteTileFetcher : NSObject, MaplyTileFetcher
Remote Tile fetcher fetches tiles from remote URLs.
The tile fetcher interacts with loaders that want tiles, as demanded by samplers. It’s complicated. There’s a default one of these that will get used if you pass in nil to the MaplyQuadImageLoader.
-
Initialize with the number of connections the fetcher can have open at once
Declaration
Objective-C
- (instancetype _Nonnull)initWithName:(NSString *_Nonnull)name connections:(int)numConnections;
Swift
init(name: String, connections numConnections: Int32)
-
Number of outstanding connections in parallel
Declaration
Objective-C
@property (nonatomic) int numConnections;
Swift
var numConnections: Int32 { get set }
-
Local storage is for pre-downloaded tiles, rather than a cache. This is consulted before we go out to the network. If it fails, then we hit the local file cache and then we hit the network
Declaration
Objective-C
- (void)setLocalStorage:(NSObject<MaplyTileLocalStorage> *_Nonnull)localStorage;
Swift
func setLocalStorage(_ localStorage: MaplyTileLocalStorage)
-
After a tile fails to load from local storage, local cache and then a remote request, you have one more chance to provide the data Useful if you’ve got an old version of the tile lying around you might use in a pinch
Declaration
Objective-C
- (void)setSecondChance:(NSObject<MaplyTileSecondChance> *_Nonnull)secondChance;
Swift
func setSecondChance(_ secondChance: MaplyTileSecondChance)
-
Return the fetching stats since the beginning or since the last reset
Declaration
Objective-C
- (MaplyRemoteTileFetcherStats *_Nullable)getStats:(_Bool)allTime;
Swift
func getStats(_ allTime: Bool) -> MaplyRemoteTileFetcherStats?
-
Reset the counters for one variant of stat
Declaration
Objective-C
- (void)resetStats;
Swift
func resetStats()
-
Reset just the active counters
Declaration
Objective-C
- (void)resetActiveStats;
Swift
func resetActiveStats()
-
Start logging request (and times and such)
Declaration
Objective-C
- (void)startLogging;
Swift
func startLogging()
-
Stop logging and return the log itself
Declaration
Objective-C
- (MaplyRemoteTileFetcherLog *_Nullable)stopLogging;
Swift
func stopLogging() -> MaplyRemoteTileFetcherLog?
-
Undocumented
Declaration
Objective-C
@property (nonatomic) bool debugMode
Swift
var debugMode: Bool { get set }