CachedTileOverlay

public class CachedTileOverlay : MKTileOverlay

Overwrites the default overlay to store downloaded images

  • Undocumented

    Declaration

    Swift

    let mapCache: MapCacheProtocol
  • Undocumented

    Declaration

    Swift

    public var useCache: Bool
  • Undocumented

    Declaration

    Swift

    public init(withCache cache: MapCacheProtocol)
  • Generates the URL for the tile to be requested. It replaces the values of {z},{x} and {y} in the urlTemplate defined in GPXTileServer

    -SeeAlso: GPXTileServer

    Declaration

    Swift

    override public func url(forTilePath path: MKTileOverlayPath) -> URL
  • Loads the tile from the network or from cache

    If the internal app cache is activated,it tries to get the tile from it. If not, it uses the default system cache (managed by the OS).

    Declaration

    Swift

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