aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt2
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/UnitMapFragment.kt7
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)
}