1.修改布局允许水平旋转2.修复主页访问图层管理崩溃问题3.扩充轨迹字段
This commit is contained in:
@@ -13,10 +13,15 @@ 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_LANDSCAPE//横屏
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 显示loading dialog
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.navinfo.omqs.ui.activity.console
|
||||
|
||||
import android.content.Intent
|
||||
import android.content.pm.ActivityInfo
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
@@ -199,7 +200,7 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
|
||||
* 图层设置
|
||||
*/
|
||||
R.id.console_layer_setting_bg, R.id.console_layer_setting_icon_bg -> {
|
||||
/* if (sceneFlag) {
|
||||
if (sceneFlag) {
|
||||
mFragment = LayermanagerFragment()
|
||||
sceneFlag = false
|
||||
TransitionManager.go(bScene, bTransition)
|
||||
@@ -210,7 +211,7 @@ class ConsoleActivity : BaseActivity(), OnClickListener {
|
||||
.replace(fragmentId, mFragment!!).commit()
|
||||
}
|
||||
return
|
||||
}*/
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 测评结果列表
|
||||
|
||||
@@ -78,6 +78,9 @@ class MainViewModel @Inject constructor(
|
||||
|
||||
// var testPoint = GeoPoint(0, 0)
|
||||
|
||||
//uuid标识,用于记录轨迹组
|
||||
val uuid = UUID.randomUUID().toString()
|
||||
|
||||
//语音窗体
|
||||
private var pop: PopupWindow? = null
|
||||
|
||||
@@ -160,15 +163,9 @@ class MainViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
private fun initLocation() {
|
||||
// mapController.locationLayerHandler.setNiLocationListener(NiLocationListener {
|
||||
// addSaveTrace(it)
|
||||
//
|
||||
// })
|
||||
//用于定位点存储到数据库
|
||||
viewModelScope.launch(Dispatchers.Default) {
|
||||
mapController.locationLayerHandler.niLocationFlow.collect { location ->
|
||||
// location.longitude = testPoint.longitude
|
||||
// location.latitude = testPoint.latitude
|
||||
val geometry = GeometryTools.createGeometry(
|
||||
GeoPoint(
|
||||
location.latitude, location.longitude
|
||||
@@ -186,7 +183,13 @@ class MainViewModel @Inject constructor(
|
||||
location.tiley = y
|
||||
}
|
||||
}
|
||||
Log.e("jingo", "定位点插入 ${Thread.currentThread().name}")
|
||||
Log.e("jingo", "定位点插入 ${location.longitude}")
|
||||
location.groupId = uuid
|
||||
try {
|
||||
location.timeStamp = DateTimeUtil.getTime(location.time).toString()
|
||||
}catch (e: Exception){
|
||||
|
||||
}
|
||||
traceDataBase.niLocationDao.insert(location)
|
||||
mapController.mMapView.vtmMap.updateMap(true)
|
||||
}
|
||||
@@ -194,8 +197,6 @@ class MainViewModel @Inject constructor(
|
||||
//用于定位点捕捉道路
|
||||
viewModelScope.launch(Dispatchers.Default) {
|
||||
mapController.locationLayerHandler.niLocationFlow.collectLatest { location ->
|
||||
// location.longitude = testPoint.longitude
|
||||
// location.latitude = testPoint.latitude
|
||||
if (!isSelectRoad()) captureLink(GeoPoint(location.latitude, location.longitude))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user