MKMapView

extension MKMapView

Extension that provides MKMapView support to use MapCache.

See also

Readme documentation
  • Will tell the map to use the cache passed as parameter for getting the tiles.

    See also

    Readme

    Declaration

    Swift

    @discardableResult
    public func useCache(_ cache: MapCacheProtocol, canReplaceMapContent: Bool = true) -> CachedTileOverlay

    Parameters

    cache

    A cache that implements the MapCacheProtocol. Typically an instance of MapCache

    canReplaceMapContent

    Does the overlay replace the default map? It can be used to add a tile layer with centain level of transparency.

  • Call this method within the MKMapView delegate function mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer

    See also

    Example project and Readme documentation

    Declaration

    Swift

    public func mapCacheRenderer(forOverlay overlay: MKOverlay) -> MKOverlayRenderer
  • TODO: Implement this correctly. Returns current zoom level

    Declaration

    Swift

    public var zoomLevel: Int { get }