Skip to content

Commit 671875c

Browse files
authored
Making canReplaceMapContent settable from outside
It's a nice option to show OSM with alpha value over the Apple Maps satellite image
1 parent 13283ea commit 671875c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

MapCache/Classes/MKMapView+MapCache.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ extension MKMapView {
1919
///
2020
/// - SeeAlso: `Readme`
2121
@discardableResult
22-
public func useCache(_ cache: MapCacheProtocol) -> CachedTileOverlay {
22+
public func useCache(_ cache: MapCacheProtocol, canReplaceMapContent: Bool = true) -> CachedTileOverlay {
2323

2424
let tileServerOverlay = CachedTileOverlay(withCache: cache)
25-
tileServerOverlay.canReplaceMapContent = true
25+
tileServerOverlay.canReplaceMapContent = canReplaceMapContent
2626

2727
// Don't set `maximumZ` when wanting "over zooming".
2828
// TileOverlay will stop trying in zoom levels beyond `maximumZ`.

0 commit comments

Comments
 (0)