diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-17 23:17:29 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-17 23:17:29 -0600 |
commit | e4609ba08a21aadf5d38aecafc29810f8e1e14ee (patch) | |
tree | b43145515d0d79f76bad58b5e7977e604d16e334 /androidApp/src/main | |
parent | 4dd8fbc96af27006fd229eb98696b31ee3f8ff60 (diff) | |
download | etbsa-trackermap-mobile-e4609ba08a21aadf5d38aecafc29810f8e1e14ee.tar.gz etbsa-trackermap-mobile-e4609ba08a21aadf5d38aecafc29810f8e1e14ee.tar.bz2 etbsa-trackermap-mobile-e4609ba08a21aadf5d38aecafc29810f8e1e14ee.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')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt | 3 | ||||
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapWrapperFragment.kt | 1 |
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() |