aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-16 04:28:48 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-16 04:28:48 -0600
commitf47c9f6b62dd1949cd2f926348a7e057c3ae221c (patch)
tree838271df5797ffbd31b260138c026284d26f9136 /androidApp/src/main/java
parent4f4b7f5755c164d4d9c3c4cc35118cf3429874c6 (diff)
parentfc4bbb4e4c0e1435b6d4599c79816575dcc8d01d (diff)
downloadetbsa-trackermap-mobile-f47c9f6b62dd1949cd2f926348a7e057c3ae221c.tar.gz
etbsa-trackermap-mobile-f47c9f6b62dd1949cd2f926348a7e057c3ae221c.tar.bz2
etbsa-trackermap-mobile-f47c9f6b62dd1949cd2f926348a7e057c3ae221c.zip
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt12
1 files changed, 7 insertions, 5 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
index a8478fd..f577613 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
@@ -347,11 +347,13 @@ class MapFragment : GlobeMapFragment() {
}
fun updateTile(layer: MapLayer) {
- val tileInfo = RemoteTileInfoNew(layer.url, layer.minZoom, layer.maxZoom)
- this.tileInfo = tileInfoSetCacheDir(layer.url, tileInfo)
- this.tileInfo?.let {
- loader?.changeTileInfo(it)
- setZoomLimits(tileInfo.minZoom, tileInfo.maxZoom)
+ mapControl?.addPostSurfaceRunnable {
+ val tileInfo = RemoteTileInfoNew(layer.url, layer.minZoom, layer.maxZoom)
+ this.tileInfo = tileInfoSetCacheDir(layer.url, tileInfo)
+ this.tileInfo?.let {
+ loader?.changeTileInfo(it)
+ setZoomLimits(tileInfo.minZoom, tileInfo.maxZoom)
+ }
}
}