MapCacheProtocol
public protocol MapCacheProtocol
This protocol shall be implemented by any cache used in MapCache.
See also
Main Readme page-
An instance of
MapCacheConfigDeclaration
Swift
var config: MapCacheConfig { get set } -
The implementation shall convert a tile path into a URL object
Typically it will use the
config.urlTemplateandconfig.subdomains.An example of implementation can be found in the class
MapCacheDeclaration
Swift
func url(forTilePath path: MKTileOverlayPath) -> URL -
The implementation shall return either the tile as a Data object or an Error if the tile could not be retrieved.
See also
SeeAlso MapKit.MkTileOverlayDeclaration
Swift
func loadTile(at path: MKTileOverlayPath, result: @escaping (Data?, Error?) -> Void)
View on GitHub
MapCacheProtocol Protocol Reference