diff options
Diffstat (limited to 'androidApp/src/main/java')
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt | 9 | ||||
-rw-r--r-- | androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt | 9 |
2 files changed, 9 insertions, 9 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 e4fb8ea..4a63e65 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 @@ -58,9 +58,9 @@ class MapFragment : GlobeMapFragment() { Log.d("MapFragment", "controlHasStarted") if (tileInfo == null) { - val mapUrl = getString(R.string.maps_streets_tile_url) - val tmpInfo = RemoteTileInfoNew(mapUrl, 0, 21) - tileInfo = makeTileInfo(getString(R.string.maps_streets_tile_url), tmpInfo) + val layer = resources.getStringArray(R.array.maps_streets_tile_url) + val tmpInfo = RemoteTileInfoNew(layer[0], layer[1].toInt(), layer[2].toInt()) + tileInfo = makeTileInfo(layer[0], tmpInfo) } val params = SamplingParams() @@ -87,7 +87,6 @@ class MapFragment : GlobeMapFragment() { screenLoc: Point2d? ) { super.userDidSelect(mapControl, selObjs, loc, screenLoc) - selObjs?.forEach { selectedObject -> if (selectedObject.selObj is ScreenMarker) { val screenMarker = selectedObject.selObj as ScreenMarker @@ -302,7 +301,7 @@ class MapFragment : GlobeMapFragment() { )) } - fun focusOn(latitude: Double, longitude: Double, zoom: Double = 0.0000144, animated: Boolean = true) { + fun focusOn(latitude: Double, longitude: Double, zoom: Double = 0.00009, animated: Boolean = true) { val lat = latitude * Math.PI / 180 val lon = longitude * Math.PI / 180 if (animated) { diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt index bf5f1d8..cbd543a 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt @@ -90,13 +90,14 @@ class UnitsActivity : AppCompatActivity() { val popOver = PopupMenu(this, view) popOver.menuInflater.inflate(R.menu.map_layers, popOver.menu) popOver.setOnMenuItemClickListener { item -> - unitsViewModel.setMapLayer( + val layer = resources.getStringArray( when (item.itemId) { - R.id.layerStreets -> getString(R.string.maps_streets_tile_url) - R.id.layerSatellite -> getString(R.string.maps_satellite_url) - else -> getString(R.string.maps_streets_tile_url) + R.id.layerStreets -> R.array.maps_streets_tile_url + R.id.layerSatellite -> R.array.maps_satellite_tile_url + else -> R.array.maps_streets_tile_url } ) + unitsViewModel.setMapLayer(layer[0], layer[1].toInt(), layer[2].toInt()) true } popOver.show() |