MapCacheProtocol

public protocol MapCacheProtocol

This protocol shall be implemented by any cache used in MapCache.

See also

Main Readme page
  • An instance of MapCacheConfig

    Declaration

    Swift

    var config: MapCacheConfig { get set }
  • The implementation shall convert a tile path into a URL object

    Typically it will use the config.urlTemplate and config.subdomains.

    An example of implementation can be found in the classMapCache

    Declaration

    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.MkTileOverlay

    Declaration

    Swift

    func loadTile(at path: MKTileOverlayPath, result: @escaping (Data?, Error?) -> Void)