mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Removed unused code
This commit is contained in:
parent
82e2c03d57
commit
fa39e5823f
1 changed files with 0 additions and 40 deletions
|
|
@ -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")!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue