1.优化部分页面2.修复Task无link数据地图及控制业务无效问题

This commit is contained in:
qiji4215
2023-06-14 14:20:37 +08:00
parent e0b6d687f6
commit 4e98a5745c
12 changed files with 107 additions and 66 deletions

View File

@@ -13,12 +13,12 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder
open class BaseActivity : AppCompatActivity() {
private var loadingDialog: AlertDialog? = null
override fun onCreate(savedInstanceState: Bundle?) {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
super.onCreate(savedInstanceState)
}
override fun onResume() {
super.onResume()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
}

View File

@@ -200,12 +200,19 @@ class MainActivity : BaseActivity() {
}
//监听地图中点变化
viewModel.liveDataCenterPoint.observe(this) {
binding.mainActivityGeometry.text = "经纬度:${
BigDecimal(it.longitude).setScale(
7,
RoundingMode.HALF_UP
)
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
Log.e("qj","${it.longitude}")
try{
if(it!=null&&it.longitude!=null&&it.latitude!=null){
binding.mainActivityGeometry.text = "经纬度:${
BigDecimal(it.longitude).setScale(
7,
RoundingMode.HALF_UP
)
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
}
}catch (e:Exception){
Log.e("qj","异常")
}
}
lifecycleScope.launch {
@@ -266,9 +273,6 @@ class MainActivity : BaseActivity() {
//开启定位
mapController.locationLayerHandler.startLocation()
mapController.mMapView.setLogoVisable(View.GONE)
//启动轨迹存储
// viewModel.startSaveTraceThread(this)
}
override fun onPause() {
@@ -399,8 +403,4 @@ class MainActivity : BaseActivity() {
viewModel.stopSoundMeter()
}
}
// override fun onBackPressed() {
// super.onBackPressed()
// }
}