kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
fixed issue where user could switch map style while download window was open
rodzic
17cbce1d41
commit
5d13c74c3d
|
@ -218,8 +218,8 @@ class MapFragment : ScreenFragment("Map"), Logging, View.OnClickListener {
|
||||||
|
|
||||||
private fun downloadJobAlert() {
|
private fun downloadJobAlert() {
|
||||||
//prompt for input params .
|
//prompt for input params .
|
||||||
map.overlayManager = CustomOverlayManager.create(map, context)
|
|
||||||
binding.downloadButton.hide()
|
binding.downloadButton.hide()
|
||||||
|
binding.mapStyleButton.visibility = View.GONE
|
||||||
binding.cacheLayout.visibility = View.VISIBLE
|
binding.cacheLayout.visibility = View.VISIBLE
|
||||||
val builder = AlertDialog.Builder(activity)
|
val builder = AlertDialog.Builder(activity)
|
||||||
binding.box5miles.setOnClickListener(this)
|
binding.box5miles.setOnClickListener(this)
|
||||||
|
@ -231,10 +231,11 @@ class MapFragment : ScreenFragment("Map"), Logging, View.OnClickListener {
|
||||||
executeJob.setOnClickListener(this)
|
executeJob.setOnClickListener(this)
|
||||||
binding.cancelDownload.setOnClickListener {
|
binding.cancelDownload.setOnClickListener {
|
||||||
cacheEstimate.text = ""
|
cacheEstimate.text = ""
|
||||||
drawOverlays()
|
|
||||||
binding.downloadButton.show()
|
binding.downloadButton.show()
|
||||||
|
binding.mapStyleButton.visibility = View.VISIBLE
|
||||||
binding.cacheLayout.visibility = View.GONE
|
binding.cacheLayout.visibility = View.GONE
|
||||||
setupMapProperties()
|
setupMapProperties()
|
||||||
|
drawOverlays()
|
||||||
}
|
}
|
||||||
builder.setCancelable(true)
|
builder.setCancelable(true)
|
||||||
}
|
}
|
||||||
|
@ -482,6 +483,7 @@ class MapFragment : ScreenFragment("Map"), Logging, View.OnClickListener {
|
||||||
if (this::map.isInitialized) {
|
if (this::map.isInitialized) {
|
||||||
map.setDestroyMode(false) // keeps map instance alive when in the background.
|
map.setDestroyMode(false) // keeps map instance alive when in the background.
|
||||||
map.isVerticalMapRepetitionEnabled = false // disables map repetition
|
map.isVerticalMapRepetitionEnabled = false // disables map repetition
|
||||||
|
map.overlayManager = CustomOverlayManager.create(map, context)
|
||||||
map.setScrollableAreaLimitLatitude(
|
map.setScrollableAreaLimitLatitude(
|
||||||
map.overlayManager.tilesOverlay.bounds.actualNorth,
|
map.overlayManager.tilesOverlay.bounds.actualNorth,
|
||||||
map.overlayManager.tilesOverlay.bounds.actualSouth,
|
map.overlayManager.tilesOverlay.bounds.actualSouth,
|
||||||
|
|
Ładowanie…
Reference in New Issue