修改自动定位逻辑
This commit is contained in:
parent
f40f1a1881
commit
fbf2be815f
app/src/main
assets
java/com/navinfo/omqs
res/menu
collect-library/src/main/java/com/navinfo/collect/library/map/handler
@ -8,7 +8,6 @@
|
||||
"name": "点形态",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"1007_PA": {
|
||||
"table": "OMDB_NODE_PA",
|
||||
@ -16,7 +15,6 @@
|
||||
"name": "点形态PA",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"1012": {
|
||||
"table": "OMDB_CHECKPOINT",
|
||||
@ -33,7 +31,6 @@
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 17,
|
||||
"catch":true,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"2002": {
|
||||
"table": "OMDB_RD_LINK_FUNCTION_CLASS",
|
||||
@ -82,7 +79,6 @@
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"checkLinkId": false,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
@ -133,7 +129,6 @@
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"2090":{
|
||||
"table": "OMDB_LANE_CONSTRUCTION",
|
||||
@ -141,8 +136,7 @@
|
||||
"name": "车道施工",
|
||||
"catch":true,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
"zoomMax": 20
|
||||
},
|
||||
"2201":{
|
||||
"table": "OMDB_BRIDGE",
|
||||
@ -178,7 +172,7 @@
|
||||
"table": "OMDB_OBJECT_TEXT",
|
||||
"code": 3002,
|
||||
"name": "文字",
|
||||
"zoomMin": 15,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"transformer": []
|
||||
@ -187,7 +181,7 @@
|
||||
"table": "OMDB_OBJECT_SYMBOL",
|
||||
"code": 3003,
|
||||
"name": "符号",
|
||||
"zoomMin": 15,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"transformer": []
|
||||
@ -196,7 +190,7 @@
|
||||
"table": "OMDB_OBJECT_ARROW",
|
||||
"code": 3004,
|
||||
"name": "箭头",
|
||||
"zoomMin": 15,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"transformer": [
|
||||
{
|
||||
@ -211,6 +205,8 @@
|
||||
"table": "OMDB_TRAFFIC_SIGN",
|
||||
"code": 3005,
|
||||
"name": "交通标牌",
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"is3D": true,
|
||||
"transformer": [
|
||||
{
|
||||
@ -232,6 +228,8 @@
|
||||
"name": "杆状物",
|
||||
"is3D": true,
|
||||
"catch":true,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
@ -254,7 +252,7 @@
|
||||
"code": 3014,
|
||||
"name": "人行横道",
|
||||
"catch":true,
|
||||
"zoomMin": 15,
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20
|
||||
},
|
||||
"3016":{
|
||||
@ -263,8 +261,7 @@
|
||||
"name": "停止位置",
|
||||
"zoomMin": 18,
|
||||
"catch":true,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
"zoomMax": 20
|
||||
},
|
||||
"4001": {
|
||||
"table": "OMDB_INTERSECTION",
|
||||
@ -502,7 +499,6 @@
|
||||
"name": "车道中心线",
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
|
@ -225,6 +225,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
renderEntity.zoomMax = map["qi_zoomMax"].toString().toInt()
|
||||
|
||||
renderEntity.geometry = map["geometry"].toString()
|
||||
Log.d("ImportOMDBHelper", "解析===1处理3D")
|
||||
// 其他数据插入到Properties中
|
||||
if (!currentConfig.is3D) { // 如果是非3d要素,则自动将Z轴坐标全部置为0
|
||||
val coordinates =
|
||||
@ -249,7 +250,8 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
renderEntity.geometry = newGeometry.toString()
|
||||
}
|
||||
}
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===2处理3D")
|
||||
Log.d("ImportOMDBHelper", "解析===1处理属性")
|
||||
for ((key, value) in map) {
|
||||
when (value) {
|
||||
is String -> renderEntity.properties.put(key, value)
|
||||
@ -269,12 +271,14 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===2处理属性")
|
||||
Log.d("ImportOMDBHelper", "解析===1处理name")
|
||||
// 如果properties中不包含name,那么自动将要素名称添加进properties中
|
||||
if (!renderEntity.properties.containsKey("name")) {
|
||||
renderEntity.properties["name"] = renderEntity.name;
|
||||
}
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===2处理name")
|
||||
Log.d("ImportOMDBHelper", "解析===1处理杆状物")
|
||||
//优先过滤掉不需要的数据
|
||||
if (renderEntity.code == DataCodeEnum.OMDB_POLE.code) { // 杆状物
|
||||
//过滤树类型的杆状物,无需导入到数据库中
|
||||
@ -330,10 +334,8 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//交限增加相同LinkIn与LinkOut过滤原则
|
||||
if (renderEntity.code == DataCodeEnum.OMDB_RESTRICTION.code) {
|
||||
//交限增加相同LinkIn与LinkOut过滤原则
|
||||
}else if (renderEntity.code == DataCodeEnum.OMDB_RESTRICTION.code) {
|
||||
if (renderEntity.properties.containsKey("linkIn") && renderEntity.properties.containsKey(
|
||||
"linkOut"
|
||||
)
|
||||
@ -354,7 +356,8 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===2处理杆状物")
|
||||
Log.d("ImportOMDBHelper", "解析===1任务路线匹配")
|
||||
//遍历判断只显示与任务Link相关的任务数据
|
||||
if (currentConfig.checkLinkId) {
|
||||
|
||||
@ -406,8 +409,10 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//不包括linkPid直接过滤
|
||||
continue
|
||||
}
|
||||
|
||||
//过滤掉非任务路线上的数据
|
||||
if (renderEntity.enable != 1) {
|
||||
Log.e(
|
||||
@ -421,18 +426,21 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
renderEntity.enable = 2
|
||||
Log.e("qj", "${renderEntity.name}==不包括任务linkPid")
|
||||
}
|
||||
Log.d("ImportOMDBHelper", "解析===2任务路线匹配")
|
||||
Log.d("ImportOMDBHelper", "解析===1预处理")
|
||||
|
||||
if (currentConfig.catch) {
|
||||
renderEntity.catchEnable = 1
|
||||
} else {
|
||||
renderEntity.catchEnable = 0
|
||||
}
|
||||
|
||||
// 对renderEntity做预处理后再保存
|
||||
val resultEntity = importConfig.transformProperties(renderEntity)
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===2预处理")
|
||||
if (resultEntity != null) {
|
||||
|
||||
if (currentConfig.catch) {
|
||||
renderEntity.catchEnable = 1
|
||||
} else {
|
||||
renderEntity.catchEnable = 0
|
||||
}
|
||||
|
||||
Log.d("ImportOMDBHelper", "解析===1子code处理")
|
||||
//对code编码需要特殊处理 存在多个属性值时,渲染优先级:SA>PA,存在多个属性值时,渲染优先级:FRONTAGE>MAIN_SIDE_A CCESS
|
||||
if (renderEntity.code == DataCodeEnum.OMDB_LINK_ATTRIBUTE.code) {
|
||||
|
||||
@ -608,6 +616,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
renderEntity.properties["startTime"] = "null"
|
||||
}
|
||||
}
|
||||
Log.d("ImportOMDBHelper", "解析===2子code处理")
|
||||
++dataIndex
|
||||
Log.e("qj", "统计==${dataIndex}")
|
||||
|
||||
@ -633,7 +642,6 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
// 1个文件发送一次flow流
|
||||
emit("${++processIndex}/${tableNum}")
|
||||
}
|
||||
|
||||
}
|
||||
Realm.getInstance (currentInstallTaskConfig).commitTransaction()
|
||||
Realm.getInstance(currentInstallTaskConfig).close()
|
||||
|
@ -325,7 +325,9 @@ class MainActivity : BaseActivity() {
|
||||
7, RoundingMode.HALF_UP
|
||||
)
|
||||
},${BigDecimal(it.latitude).setScale(7, RoundingMode.HALF_UP)}"
|
||||
viewModel.startAutoLocationTimer()
|
||||
if(Constant.AUTO_LOCATION){
|
||||
viewModel.startAutoLocationTimer()
|
||||
}
|
||||
binding.mainActivityLocation.setImageResource(R.drawable.icon_location)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
@ -49,7 +49,7 @@
|
||||
<item
|
||||
android:id="@+id/personal_center_menu_version"
|
||||
android:icon="@drawable/ic_baseline_layers_24"
|
||||
android:title="版本:23QE4_V1.5.0_20230904_A" />
|
||||
android:title="版本:23QE4_V1.5.0_20230912_A" />
|
||||
</group>
|
||||
<group android:checkableBehavior="single">
|
||||
<item android:title="小标题">
|
||||
|
@ -28,7 +28,7 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
||||
//高亮线绘制线 样式
|
||||
val defaultLineStyle = Style.builder()
|
||||
.stippleColor(context.resources.getColor(R.color.draw_line_blue2_color))
|
||||
.strokeWidth(5f)
|
||||
.strokeWidth(10f)
|
||||
.fillColor(context.resources.getColor(R.color.teal_200))
|
||||
.fillAlpha(0.5f)
|
||||
.strokeColor(context.resources.getColor(R.color.teal_200))
|
||||
|
Loading…
x
Reference in New Issue
Block a user