Merge branch 'master' of gitlab.navinfo.com:CollectVehicle/OneMapQS
This commit is contained in:
@@ -181,6 +181,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"3001":{
|
||||
"table": "OMDB_OBJECT_OH_STRUCT",
|
||||
"code": 3001,
|
||||
"name": "上方障碍物",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"checkLinkId": false,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
"v": "~",
|
||||
"klib": "geometry",
|
||||
"vlib": "getPolygonCenterPoint()"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3002":{
|
||||
"table": "OMDB_OBJECT_TEXT",
|
||||
"code": 3002,
|
||||
@@ -281,6 +298,15 @@
|
||||
"catch":true,
|
||||
"zoomMax": 20
|
||||
},
|
||||
"3027":{
|
||||
"table": "OMDB_OBJECT_REFUGE_ISLAND",
|
||||
"code": 3027,
|
||||
"name": "路口内交通岛",
|
||||
"catch":true,
|
||||
"checkLinkId": false,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20
|
||||
},
|
||||
"4001": {
|
||||
"table": "OMDB_INTERSECTION",
|
||||
"code": 4001,
|
||||
@@ -524,6 +550,7 @@
|
||||
"table": "OMDB_LANE_LINK_LG",
|
||||
"code": 5001,
|
||||
"name": "车道中心线",
|
||||
"catch":false,
|
||||
"checkLinkId": false,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
|
||||
@@ -92,11 +92,6 @@ class Constant {
|
||||
|
||||
const val DEBUG = true
|
||||
|
||||
/**
|
||||
* 地图最多缩放级别20
|
||||
*/
|
||||
const val MAX_ZOOM = 20
|
||||
|
||||
/**
|
||||
* 是否自动定位
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.utils.GeometryTools
|
||||
import com.navinfo.omqs.Constant
|
||||
import io.realm.Realm
|
||||
import io.realm.RealmConfiguration
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
import org.locationtech.jts.algorithm.Angle
|
||||
@@ -583,9 +582,9 @@ class ImportPreProcess {
|
||||
angleReference.renderEntityId = renderEntity.id
|
||||
angleReference.name = "${renderEntity.name}车道中线面"
|
||||
angleReference.table = renderEntity.table
|
||||
angleReference.geometry = renderEntity.geometry
|
||||
angleReference.geometry = GeometryTools.computeLine(0.00002,0.00002,renderEntity.geometry)
|
||||
angleReference.properties["qi_table"] = renderEntity.table
|
||||
angleReference.properties["width"] = "3"
|
||||
angleReference.properties["widthProperties"] = "3"
|
||||
angleReference.zoomMin = renderEntity.zoomMin
|
||||
angleReference.zoomMax = renderEntity.zoomMax
|
||||
angleReference.taskId = renderEntity.taskId
|
||||
@@ -845,8 +844,46 @@ class ImportPreProcess {
|
||||
val listResult = mutableListOf<ReferenceEntity>()
|
||||
|
||||
val coorEnd = Coordinate(pointStart.getX() + dx, pointStart.getY() + dy, pointStart.z)
|
||||
renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
|
||||
// renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
|
||||
renderEntity.geometry = GeometryTools.createGeometry(GeoPoint(centerPoint!!.y, centerPoint.x)).toString()
|
||||
val code = renderEntity.properties["signType"]
|
||||
renderEntity.properties["src"] = "assets:omdb/appendix/1105_${code}_0.svg"
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取上方障碍物中心点坐标
|
||||
*
|
||||
* */
|
||||
fun getPolygonCenterPoint(renderEntity: RenderEntity, containsDirect: Boolean = false) {
|
||||
// 获取中心坐标点,将中心坐标作为数据的新的geometry位置
|
||||
val centerPoint = renderEntity.wkt?.centroid
|
||||
if (containsDirect) {
|
||||
// 根据heading方向自动生成新的Geometry
|
||||
var radian = 0.0
|
||||
val pointStart = Coordinate(centerPoint!!.x, centerPoint.y)
|
||||
var angle =
|
||||
if (renderEntity?.properties?.get("heading") == null) 0.0 else renderEntity?.properties?.get(
|
||||
"heading"
|
||||
)?.toDouble()!!
|
||||
// angle角度为与正北方向的顺时针夹角,将其转换为与X轴正方向的逆时针夹角,即为正东方向的夹角
|
||||
angle = ((450 - angle) % 360)
|
||||
radian = Math.toRadians(angle)
|
||||
|
||||
// 计算偏移距离
|
||||
var dx: Double = GeometryTools.convertDistanceToDegree(
|
||||
defaultTranslateDistance,
|
||||
centerPoint.y
|
||||
) * Math.cos(radian)
|
||||
var dy: Double = GeometryTools.convertDistanceToDegree(
|
||||
defaultTranslateDistance,
|
||||
centerPoint.y
|
||||
) * Math.sin(radian)
|
||||
val listResult = mutableListOf<ReferenceEntity>()
|
||||
|
||||
val coorEnd = Coordinate(pointStart.getX() + dx, pointStart.getY() + dy, pointStart.z)
|
||||
renderEntity.geometry = WKTWriter(3).write(GeometryTools.createLineString(arrayOf(pointStart, coorEnd)))
|
||||
} else {
|
||||
renderEntity.geometry = GeometryTools.createGeometry(GeoPoint(centerPoint!!.y, centerPoint.x)).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,10 +125,13 @@ class TaskUploadScope(
|
||||
}
|
||||
|
||||
taskBean.hadLinkDvoList.forEach { hadLinkDvoBean ->
|
||||
Log.e("jingo", "数据上传遍历开始")
|
||||
|
||||
val linkStatus = 1
|
||||
//存在原因标记未测评
|
||||
if (hadLinkDvoBean.reason.isNotEmpty()) {
|
||||
Log.e("jingo", "数据上传遍历开始0${hadLinkDvoBean.linkPid}")
|
||||
|
||||
//未测评
|
||||
val linkStatus = 0
|
||||
|
||||
@@ -160,6 +163,8 @@ class TaskUploadScope(
|
||||
|
||||
} else {
|
||||
|
||||
Log.e("jingo", "数据上传遍历开始1${hadLinkDvoBean.linkPid}")
|
||||
|
||||
val linkStatus = hadLinkDvoBean.linkStatus
|
||||
|
||||
var s: String = "%.3f".format(hadLinkDvoBean.length)//保留一位小数(且支持四舍五入)
|
||||
@@ -221,8 +226,9 @@ class TaskUploadScope(
|
||||
}
|
||||
}
|
||||
}
|
||||
realm.close()
|
||||
Log.e("jingo", "数据上传遍历结束")
|
||||
}
|
||||
realm.close()
|
||||
|
||||
if (bodyList.size > 0) {
|
||||
val result = uploadManager.netApi.postRequest(bodyList)// .enqueue(object :
|
||||
|
||||
@@ -40,7 +40,13 @@ class LoginActivity : CheckPermissionsActivity() {
|
||||
binding.activity = this
|
||||
initView()
|
||||
Log.e("jingo", getScreenParams())
|
||||
UMConfigure.init(this, "650bece7b2f6fa00ba573c7a", "native", UMConfigure.DEVICE_TYPE_PHONE, "")
|
||||
UMConfigure.init(
|
||||
this,
|
||||
"650bece7b2f6fa00ba573c7a",
|
||||
"native",
|
||||
UMConfigure.DEVICE_TYPE_PHONE,
|
||||
""
|
||||
)
|
||||
}
|
||||
|
||||
private fun getScreenParams(): String {
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.data.entity.TaskBean
|
||||
import com.navinfo.collect.library.utils.GeometryTools
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.bean.LoginUserBean
|
||||
import com.navinfo.omqs.bean.SysUserBean
|
||||
@@ -132,6 +133,7 @@ class LoginViewModel @Inject constructor(
|
||||
}
|
||||
//不指定IO,会在主线程里运行
|
||||
jobLogin = viewModelScope.launch(Dispatchers.IO) {
|
||||
//Log.e("qj", "computeline==${GeometryTools.computeLine(0.003,0.003,"LINESTRING(116.2730063860964 40.09052257957624 36.75, 116.27376497186042 40.090072453495395 38.34, 116.27413076766412 40.089855289361786 39.01, 116.27417239035157 40.08983061650492 39.15, 116.27466896728139 40.089535645040385 39.99, 116.2751211296483 40.089267551829636 40.67, 116.27545352868347 40.089070581974944 40.98, 116.27589660200627 40.088807594767246 41.28, 116.27604819769634 40.088718103405185 41.34, 116.27667570485863 40.08834486145473 41.43, 116.2770275412774 40.08813642434714 41.36, 116.27745673745146 40.087882150865546 41.14, 116.27778797172138 40.08768490714857 40.89, 116.2781675465249 40.087459905560266 40.45, 116.2783819045443 40.087332076220086 40.02, 116.27880692426884 40.0870801193608 39.32, 116.27943180930261 40.08670963506418 38.04, 116.27977508323622 40.08650562397605 37.39, 116.28016410016664 40.08627485623695 36.77, 116.28057924586821 40.0860283164225 36.29)")}")
|
||||
loginCheck(context, userName, password)
|
||||
}
|
||||
|
||||
|
||||
@@ -16,16 +16,18 @@ import androidx.activity.viewModels
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavDestination
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import androidx.navigation.Navigation
|
||||
import androidx.navigation.findNavController
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.blankj.utilcode.util.ClipboardUtils
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
import com.navinfo.collect.library.data.entity.RenderEntity
|
||||
import com.navinfo.collect.library.map.NIMapController
|
||||
import com.navinfo.collect.library.map.handler.MeasureLayerHandler
|
||||
import com.navinfo.collect.library.utils.GeometryTools
|
||||
import com.navinfo.omqs.Constant
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.bean.ImportConfig
|
||||
@@ -45,8 +47,10 @@ import com.navinfo.omqs.ui.other.BaseToast
|
||||
import com.navinfo.omqs.ui.widget.RecyclerViewSpacesItemDecoration
|
||||
import com.navinfo.omqs.util.FlowEventBus
|
||||
import com.navinfo.omqs.util.NaviStatus
|
||||
import com.navinfo.omqs.util.SignUtil
|
||||
import com.navinfo.omqs.util.SpeakMode
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import org.oscim.core.GeoPoint
|
||||
@@ -56,7 +60,6 @@ import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
import javax.inject.Inject
|
||||
|
||||
|
||||
/**
|
||||
* 地图主页面
|
||||
*/
|
||||
@@ -187,7 +190,7 @@ class MainActivity : BaseActivity() {
|
||||
viewModel.speakMode = SpeakMode(this)
|
||||
// 在mapController初始化前获取当前OMDB图层显隐
|
||||
viewModel.refreshOMDBLayer(LayerConfigUtils.getLayerConfigList())
|
||||
mapController.mMapView.vtmMap.viewport().maxZoomLevel = Constant.MAX_ZOOM
|
||||
mapController.mMapView.vtmMap.viewport().maxZoomLevel = com.navinfo.collect.library.system.Constant.MAX_ZOOM
|
||||
//关联生命周期
|
||||
binding.lifecycleOwner = this
|
||||
//给xml转递对象
|
||||
@@ -346,30 +349,22 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
viewModel.liveDataSignMoreInfo.observe(this) {
|
||||
val fragment =
|
||||
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
|
||||
if (fragment == null) {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment())
|
||||
.commit()
|
||||
|
||||
if(!rightController.backQueue.isEmpty()){
|
||||
rightController.navigateUp()
|
||||
}
|
||||
// val listener: NavController.OnDestinationChangedListener =
|
||||
// NavController.OnDestinationChangedListener { _, _, _ ->
|
||||
// val bundle = Bundle()
|
||||
// bundle.putParcelable("SignBean", it)
|
||||
// bundle.putBoolean("AutoSave", false)
|
||||
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
// }
|
||||
// rightController.addOnDestinationChangedListener(listener)
|
||||
// if(!rightController.navigateUp()) {
|
||||
// val bundle = Bundle()
|
||||
// bundle.putParcelable("SignBean", it)
|
||||
// bundle.putBoolean("AutoSave", false)
|
||||
// rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
// }
|
||||
rightController.navigateUp()
|
||||
|
||||
lifecycleScope.launch{
|
||||
delay(100)
|
||||
val fragment =
|
||||
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
|
||||
if (fragment == null) {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment())
|
||||
.commit()
|
||||
}else{
|
||||
supportFragmentManager.beginTransaction().add(R.id.main_activity_sign_more_info_fragment, SignMoreInfoFragment()).commit()
|
||||
}
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable("SignBean", it)
|
||||
bundle.putBoolean("AutoSave", false)
|
||||
@@ -480,9 +475,9 @@ class MainActivity : BaseActivity() {
|
||||
viewModel.liveDataItemList.observe(this) {
|
||||
if (it.isNotEmpty()) {
|
||||
if (leftFragment == null || leftFragment !is ItemListFragment) {
|
||||
leftFragment = ItemListFragment { fragment ->
|
||||
leftFragment = ItemListFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction().remove(fragment).commit()
|
||||
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
}
|
||||
@@ -698,7 +693,7 @@ class MainActivity : BaseActivity() {
|
||||
Toast.makeText(this, "输入格式不正确", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
// dialog.dismiss()
|
||||
dialog.dismiss()
|
||||
}
|
||||
inputDialog.show()
|
||||
}
|
||||
@@ -794,7 +789,9 @@ class MainActivity : BaseActivity() {
|
||||
* zoomin
|
||||
*/
|
||||
fun zoomInOnclick(view: View) {
|
||||
mapController.animationHandler.zoomIn()
|
||||
Log.e("qj", "computeline==${GeometryTools.computeLine(0.00003,0.00003,"LINESTRING(116.2730063860964 40.09052257957624 36.75, 116.27376497186042 40.090072453495395 38.34, 116.27413076766412 40.089855289361786 39.01, 116.27417239035157 40.08983061650492 39.15, 116.27466896728139 40.089535645040385 39.99, 116.2751211296483 40.089267551829636 40.67, 116.27545352868347 40.089070581974944 40.98, 116.27589660200627 40.088807594767246 41.28, 116.27604819769634 40.088718103405185 41.34, 116.27667570485863 40.08834486145473 41.43, 116.2770275412774 40.08813642434714 41.36, 116.27745673745146 40.087882150865546 41.14, 116.27778797172138 40.08768490714857 40.89, 116.2781675465249 40.087459905560266 40.45, 116.2783819045443 40.087332076220086 40.02, 116.27880692426884 40.0870801193608 39.32, 116.27943180930261 40.08670963506418 38.04, 116.27977508323622 40.08650562397605 37.39, 116.28016410016664 40.08627485623695 36.77, 116.28057924586821 40.0860283164225 36.29)")}")
|
||||
|
||||
//mapController.animationHandler.zoomIn()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1225,10 +1222,10 @@ class MainActivity : BaseActivity() {
|
||||
/**
|
||||
* 隐藏更多信息面板
|
||||
*/
|
||||
fun backSignMoreInfo() {
|
||||
fun backSignMoreInfo(){
|
||||
val fragment =
|
||||
supportFragmentManager.findFragmentById(R.id.main_activity_sign_more_info_fragment)
|
||||
if (fragment != null && !fragment.isHidden) {
|
||||
if(fragment!=null&&!fragment.isHidden){
|
||||
supportFragmentManager.beginTransaction().remove(fragment).commit()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
||||
// 定位到指定位置
|
||||
niMapController.mMapView.vtmMap.animator()
|
||||
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
||||
.animateTo(GeoPoint(40.5016054261786, 115.82381251427815))
|
||||
.animateTo(GeoPoint(40.50704534740206, 115.80404946472662))
|
||||
}
|
||||
|
||||
R.id.personal_center_menu_open_all_layer -> {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.navinfo.omqs.ui.fragment.tasklist
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
@@ -225,6 +226,9 @@ class TaskListAdapter(
|
||||
binding.taskUploadBtn.stopAnimator()
|
||||
binding.taskUploadBtn.setText("重新同步")
|
||||
binding.taskUploadBtn.setProgress(100)
|
||||
if(!TextUtils.isEmpty(taskBean.errMsg)){
|
||||
Toast.makeText(binding.root.context,taskBean.errMsg,Toast.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
FileUploadStatus.NONE -> {
|
||||
|
||||
@@ -503,9 +503,10 @@ class TaskViewModel @Inject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
realm.close()
|
||||
if(result==1){
|
||||
liveDataTaskUpload.postValue(map)
|
||||
withContext(Dispatchers.Main) {
|
||||
liveDataTaskUpload.postValue(map)
|
||||
val mDialog = FirstDialog(context)
|
||||
mDialog.setTitle("提示?")
|
||||
mDialog.setMessage("此任务中存在新增Link无问题记录,请添加至少一条记录!")
|
||||
@@ -518,8 +519,8 @@ class TaskViewModel @Inject constructor(
|
||||
mDialog.show()
|
||||
}
|
||||
}else if(result==2){
|
||||
liveDataTaskUpload.postValue(map)
|
||||
withContext(Dispatchers.Main) {
|
||||
liveDataTaskUpload.postValue(map)
|
||||
val mDialog = FirstDialog(context)
|
||||
mDialog.setTitle("提示?")
|
||||
mDialog.setMessage("此任务中存在未测评link,请确认!")
|
||||
@@ -539,7 +540,6 @@ class TaskViewModel @Inject constructor(
|
||||
map[taskBean] = true
|
||||
liveDataTaskUpload.postValue(map)
|
||||
}
|
||||
realm.close()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_version"
|
||||
android:icon="@drawable/ic_baseline_layers_24"
|
||||
android:title="版本:23QE4_V1.5.3_20230920_A" />
|
||||
android:title="版本:23QE4_V1.5.4_20230926_A" />
|
||||
</group>
|
||||
<group android:checkableBehavior="single">
|
||||
<item android:title="小标题">
|
||||
|
||||
Reference in New Issue
Block a user