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