解决冲突
This commit is contained in:
parent
ebc4ddf5a9
commit
e4f28405dc
@ -223,7 +223,7 @@ class MainViewModel @Inject constructor(
|
|||||||
|
|
||||||
val linkId = link.properties[RenderEntity.Companion.LinkTable.linkPid]
|
val linkId = link.properties[RenderEntity.Companion.LinkTable.linkPid]
|
||||||
|
|
||||||
if(linkIdCache!=linkId){
|
if (linkIdCache != linkId) {
|
||||||
|
|
||||||
Log.e("jingo", "捕捉到的linkid $linkId ${link.geometry}")
|
Log.e("jingo", "捕捉到的linkid $linkId ${link.geometry}")
|
||||||
mapController.lineHandler.showLine(link.geometry)
|
mapController.lineHandler.showLine(link.geometry)
|
||||||
@ -257,32 +257,32 @@ class MainViewModel @Inject constructor(
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val realm = Realm.getDefaultInstance()
|
val realm = Realm.getDefaultInstance()
|
||||||
val entity = realm.where(RenderEntity::class.java)
|
val entity = realm.where(RenderEntity::class.java)
|
||||||
.equalTo("table", "OMDB_RESTRICTION")
|
.equalTo("table", "OMDB_RESTRICTION")
|
||||||
.and()
|
|
||||||
.equalTo(
|
|
||||||
"properties['linkIn']",
|
|
||||||
it
|
|
||||||
).findFirst()
|
|
||||||
if (entity != null) {
|
|
||||||
val outLink = entity.properties["linkOut"]
|
|
||||||
val linkOutEntity = realm.where(RenderEntity::class.java)
|
|
||||||
.equalTo("table", "OMDB_RD_LINK")
|
|
||||||
.and()
|
.and()
|
||||||
.equalTo(
|
.equalTo(
|
||||||
"properties['${RenderEntity.Companion.LinkTable.linkPid}']",
|
"properties['linkIn']",
|
||||||
outLink
|
it
|
||||||
).findFirst()
|
).findFirst()
|
||||||
if (linkOutEntity != null) {
|
if (entity != null) {
|
||||||
mapController.lineHandler.linksLayer.addLine(
|
val outLink = entity.properties["linkOut"]
|
||||||
linkOutEntity.geometry,
|
val linkOutEntity = realm.where(RenderEntity::class.java)
|
||||||
0x7DFF0000
|
.equalTo("table", "OMDB_RD_LINK")
|
||||||
)
|
.and()
|
||||||
Log.e("jingo", "捕捉到的linkid $outLink ${linkOutEntity.geometry}")
|
.equalTo(
|
||||||
|
"properties['${RenderEntity.Companion.LinkTable.linkPid}']",
|
||||||
|
outLink
|
||||||
|
).findFirst()
|
||||||
|
if (linkOutEntity != null) {
|
||||||
|
mapController.lineHandler.linksLayer.addLine(
|
||||||
|
linkOutEntity.geometry,
|
||||||
|
0x7DFF0000
|
||||||
|
)
|
||||||
|
Log.e("jingo", "捕捉到的linkid $outLink ${linkOutEntity.geometry}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
liveDataTopSignList.postValue(topSignList.distinctBy { it.elementCode })
|
liveDataTopSignList.postValue(topSignList.distinctBy { it.elementCode })
|
||||||
liveDataSignList.postValue(signList.distinctBy { it.elementCode })
|
liveDataSignList.postValue(signList.distinctBy { it.elementCode })
|
||||||
@ -292,9 +292,10 @@ class MainViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
linkIdCache = linkId ?: ""
|
linkIdCache = linkId ?: ""
|
||||||
Log.e("jingo", "自动捕捉数据 共${signList.size}条")
|
Log.e("jingo", "自动捕捉数据 共${signList.size}条")
|
||||||
}else{
|
} else {
|
||||||
mapController.lineHandler.removeLine()
|
mapController.lineHandler.removeLine()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -479,7 +480,7 @@ class MainViewModel @Inject constructor(
|
|||||||
fun setSelectRoad(select: Boolean) {
|
fun setSelectRoad(select: Boolean) {
|
||||||
bSelectRoad = select
|
bSelectRoad = select
|
||||||
//去掉缓存
|
//去掉缓存
|
||||||
linkIdCache = ""
|
linkIdCache = ""
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||||
mapController.lineHandler.removeLine()
|
mapController.lineHandler.removeLine()
|
||||||
liveDataSignList.value = mutableListOf()
|
liveDataSignList.value = mutableListOf()
|
||||||
|
2
vtm
2
vtm
@ -1 +1 @@
|
|||||||
Subproject commit dd13e533c38b5738ab404c2737d7ccadeff01323
|
Subproject commit 1ee201a41f78f169873848209a3f3bdac36f185a
|
Loading…
x
Reference in New Issue
Block a user