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 | c2279f8ac8c606921c019e761044bd28ddf5e64c (patch) | |
tree | 8c493aea47bf871a8d46ba6b165fc20941f49efd /androidApp/src | |
parent | 594a0e7dc5680b495770876afba931b30d667264 (diff) | |
download | etbsa-trackermap-mobile-c2279f8ac8c606921c019e761044bd28ddf5e64c.tar.gz etbsa-trackermap-mobile-c2279f8ac8c606921c019e761044bd28ddf5e64c.tar.bz2 etbsa-trackermap-mobile-c2279f8ac8c606921c019e761044bd28ddf5e64c.zip |
Removed problematic layer pre-initialization
Diffstat (limited to 'androidApp/src')
-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) } |