From fa39e5823f46e7582b5fc08f996d5f3b58e9c20a Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Sun, 23 Apr 2023 08:15:34 -0700 Subject: [PATCH] Removed unused code --- .../Views/Map/Custom/MapViewSwiftUI.swift | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift index af5e576e..28fadd95 100644 --- a/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift +++ b/Meshtastic/Views/Map/Custom/MapViewSwiftUI.swift @@ -497,43 +497,3 @@ struct MapViewSwiftUI: UIViewRepresentable { } } } - -class TileServerOverlay: MKTileOverlay { - - override func url(forTilePath path: MKTileOverlayPath) -> URL { // lädt die Map-Tiles - - if path.z <= 5 { // Es wurden nur Map-Tiles für z <= 5 geladen. - - let fileManager = FileManager.default // Objekt zum Verwalten des Dateisystems - - if var url = fileManager.urls(for: .cachesDirectory, in: .userDomainMask).first { // Url vom Cache-Verzeichnis - - // Pfad wird erstellt - - url.appendPathComponent("map") - url.appendPathComponent("\(path.z)") - url.appendPathComponent("\(path.x)") - url.appendPathComponent("\(path.y).png") - - if fileManager.fileExists(atPath: url.path) { // Wenn das Map-Tile existiert... - - return url - } - else { - - //logger.info("OSMTileOverlay: MapTiles have not been downloaded yet.") - return Bundle.main.url(forResource: "default", withExtension: "png")! - } - } - else { - - //logger.error("OSMTileOverlay: Could not find cache url.") - return Bundle.main.url(forResource: "default", withExtension: "png")! - } - } - else { - - return Bundle.main.url(forResource: "default", withExtension: "png")! - } - } -}