aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-17 23:17:29 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-17 23:17:29 -0600
commit58993740a5c7bea745969e2de3641499ab79d9c8 (patch)
treeb43145515d0d79f76bad58b5e7977e604d16e334 /androidApp/src/main/java
parentdfe5dd6a425ac2418e33e0b64911b6f914eb514c (diff)
downloadetbsa-trackermap-mobile-58993740a5c7bea745969e2de3641499ab79d9c8.tar.gz
etbsa-trackermap-mobile-58993740a5c7bea745969e2de3641499ab79d9c8.tar.bz2
etbsa-trackermap-mobile-58993740a5c7bea745969e2de3641499ab79d9c8.zip
Fixed attribution text not changing with internal layer toggle and zoom out when switching layer to match limit
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt3
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt1
2 files changed, 4 insertions, 0 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 2c47677..87fb44a 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
@@ -388,6 +388,9 @@ open class MapFragment : GlobeMapFragment() {
this.tileInfo?.let { t ->
loader?.changeTileInfo(t)
setZoomLimits(tileInfo.minZoom, tileInfo.maxZoom)
+
+ val pos = mapControl.positionGeo.toPoint2d().toDegrees()
+ focusOn(pos.y, pos.x, mapControl.positionGeo.z, animated = true)
}
}
}
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt
index cecb567..4ff4c16 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt
@@ -99,6 +99,7 @@ class MapWrapperFragment: Fragment() {
if (mapFragment.hasStarted) {
Utils.showLayersPopUp(context, it) { type ->
mapFragment.updateLayer(type)
+ binding.attributionText.text = MapLayer.layers[type]?.attribution
}
} else {
binding.mapLayerToggle.performClick()