Removed unused code

This commit is contained in:
Garth Vander Houwen 2023-04-23 08:15:34 -07:00
parent 82e2c03d57
commit fa39e5823f

View file

@ -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")!
}
}
}