mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
Added cache clearing
This commit is contained in:
parent
5d13c74c3d
commit
4431443ecb
1 changed files with 14 additions and 1 deletions
|
|
@ -181,8 +181,21 @@ class MapFragment : ScreenFragment("Map"), Logging, View.OnClickListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears active tile source cache
|
||||||
|
*/
|
||||||
private fun clearCache() {
|
private fun clearCache() {
|
||||||
|
map.tileProvider.clearTileCache()
|
||||||
|
// cacheManager = CacheManager(map) // Make sure CacheManager has latest from map
|
||||||
|
// val boundingBox = BoundingBox(
|
||||||
|
// map.tileProvider.tileCache.clear(),
|
||||||
|
// map.tileProvider.tileCache.mapTileArea.right.toDouble(),
|
||||||
|
// map.tileProvider.tileCache.mapTileArea.bottom.toDouble(),
|
||||||
|
// map.tileProvider.tileCache.mapTileArea.left.toDouble()
|
||||||
|
// )
|
||||||
|
//cacheManager.cleanAreaAsync(context, boundingBox, map.minZoomLevel.toInt(), map.maxZoomLevel.toInt())
|
||||||
|
Toast.makeText(activity, "Cache Cleared", Toast.LENGTH_SHORT).show()
|
||||||
|
alertDialog!!.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue