diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-16 04:14:04 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-16 04:14:04 -0600 |
commit | a2ba612c515a53cb6e7f283858a518d60188651b (patch) | |
tree | 8c493aea47bf871a8d46ba6b165fc20941f49efd /androidApp/src/main/java/mx/trackermap | |
parent | 3f6958e68f6e4dd5d42e1049c05059502d939cf9 (diff) | |
download | etbsa-trackermap-mobile-a2ba612c515a53cb6e7f283858a518d60188651b.tar.gz etbsa-trackermap-mobile-a2ba612c515a53cb6e7f283858a518d60188651b.tar.bz2 etbsa-trackermap-mobile-a2ba612c515a53cb6e7f283858a518d60188651b.zip |
Removed problematic layer pre-initialization
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt | 2 | ||||
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt | 7 |
2 files changed, 3 insertions, 6 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 c4e5fc8..a8478fd 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 @@ -346,7 +346,7 @@ class MapFragment : GlobeMapFragment() { } } - fun updateTileInfo(layer: MapLayer) { + fun updateTile(layer: MapLayer) { val tileInfo = RemoteTileInfoNew(layer.url, layer.minZoom, layer.maxZoom) this.tileInfo = tileInfoSetCacheDir(layer.url, tileInfo) this.tileInfo?.let { diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt index 66ccc7a..6f6596f 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt @@ -15,7 +15,6 @@ import mx.trackermap.TrackerMap.android.devices.Action import mx.trackermap.TrackerMap.android.devices.UnitRenderData import mx.trackermap.TrackerMap.android.units.UnitFragment import mx.trackermap.TrackerMap.android.units.UnitsViewModel -import mx.trackermap.TrackerMap.client.models.MapLayer import mx.trackermap.TrackerMap.client.models.UnitInformation @DelicateCoroutinesApi @@ -57,9 +56,7 @@ class UnitMapFragment(private val unitsViewModel: UnitsViewModel) : UnitFragment unitsMapFragment.markerCallback = unitsViewModel::selectUnitWith val layer = resources.getStringArray(R.array.maps_streets_tile) - unitsViewModel.setMapLayer(MapLayer( - layer[0], layer[1].toInt(), layer[2].toInt(), layer[3] - )) + binding.attributionText.text = HtmlCompat.fromHtml(layer[3], 0) } private fun setupObservers() { @@ -103,7 +100,7 @@ class UnitMapFragment(private val unitsViewModel: UnitsViewModel) : UnitFragment unitsViewModel.mapLayer.observe(viewLifecycleOwner) { layer -> Log.d("UnitMapFragment", "Loading layer!") - unitsMapFragment.updateTileInfo(layer) + unitsMapFragment.updateTile(layer) binding.attributionText.text = HtmlCompat.fromHtml(layer.attribution, 0) } |