fix: 合并代码
This commit is contained in:
@@ -2,12 +2,28 @@
|
||||
{
|
||||
"tableGroupName": "普通图层",
|
||||
"tableMap" : {
|
||||
"1007": {
|
||||
"table": "OMDB_NODE_FORM",
|
||||
"code": 1007,
|
||||
"name": "点形态",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"1007_PA": {
|
||||
"table": "OMDB_NODE_PA",
|
||||
"code": 1007,
|
||||
"name": "点形态PA",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"1012": {
|
||||
"table": "OMDB_CHECKPOINT",
|
||||
"code": 1012,
|
||||
"name": "检查点",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 19
|
||||
"zoomMax": 20
|
||||
},
|
||||
"2001": {
|
||||
"table": "OMDB_RD_LINK",
|
||||
@@ -169,6 +185,14 @@
|
||||
"zoomMin": 16,
|
||||
"zoomMax": 20
|
||||
},
|
||||
"3016":{
|
||||
"table": "OMDB_OBJECT_STOPLOCATION",
|
||||
"code": 3016,
|
||||
"name": "停止位置",
|
||||
"zoomMin": 18,
|
||||
"zoomMax": 20,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"4001": {
|
||||
"table": "OMDB_INTERSECTION",
|
||||
"code": 4001,
|
||||
@@ -385,7 +409,7 @@
|
||||
"code": 2004,
|
||||
"name": "道路属性",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 19,
|
||||
"zoomMax": 20,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
@@ -437,8 +461,7 @@
|
||||
"code": 2206,
|
||||
"name": "道路形态2",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 17,
|
||||
"transformer2Code": ""
|
||||
"zoomMax": 17
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -365,6 +365,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}else if(renderEntity.code == DataCodeEnum.OMDB_LINK_FORM2.code){
|
||||
Log.e("qj","道路形态2${renderEntity.properties["formOfWay"]}")
|
||||
/*道路形态2*/
|
||||
var formWay = renderEntity.properties["formOfWay"]
|
||||
if(formWay!=null){
|
||||
@@ -407,6 +408,36 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(renderEntity.table == DataCodeEnum.OMDB_NODE_FORM.name){//特殊处理,因为code相同,使用表名判断
|
||||
//过滤不需要渲染的要素
|
||||
var formOfWay = renderEntity.properties["formOfWay"]
|
||||
if(formOfWay!=null&&formOfWay=="30"){
|
||||
renderEntity.enable=2
|
||||
}else{
|
||||
Log.e("qj","过滤不显示数据${renderEntity.table}")
|
||||
continue
|
||||
}
|
||||
}else if(renderEntity.table == DataCodeEnum.OMDB_NODE_PA.name){//特殊处理,因为code相同,使用表名判断
|
||||
//过滤不需要渲染的要素
|
||||
var attributeType = renderEntity.properties["attributeType"]
|
||||
if(attributeType!=null&&attributeType=="30"){
|
||||
renderEntity.enable=2
|
||||
}else{
|
||||
Log.e("qj","过滤不显示数据${renderEntity.table}")
|
||||
continue
|
||||
}
|
||||
}else if(renderEntity.code == DataCodeEnum.OMDB_OBJECT_STOPLOCATION.code){
|
||||
//过滤不需要渲染的要素
|
||||
var locationType = renderEntity.properties["locationType"]
|
||||
if(locationType!=null){
|
||||
when (locationType) {
|
||||
"3","4"->{
|
||||
renderEntity.enable=0
|
||||
Log.e("qj","过滤不显示数据${renderEntity.table}")
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
listResult.add(renderEntity)
|
||||
|
||||
@@ -567,6 +567,7 @@ class ImportPreProcess {
|
||||
val intersectionReference = ReferenceEntity()
|
||||
intersectionReference.renderEntityId = renderEntity.id
|
||||
intersectionReference.name = "${renderEntity.name}参考点"
|
||||
intersectionReference.code = renderEntity.code
|
||||
intersectionReference.table = renderEntity.table
|
||||
intersectionReference.zoomMin = renderEntity.zoomMin
|
||||
intersectionReference.zoomMax = renderEntity.zoomMax
|
||||
|
||||
@@ -258,7 +258,7 @@ class RealmOperateHelper() {
|
||||
val realm = getRealmDefaultInstance()
|
||||
// 查询realm中对应tile号的数据
|
||||
val realmList = getRealmTools(RenderEntity::class.java, false).and()
|
||||
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK.tableName)
|
||||
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK.name)
|
||||
.and()
|
||||
.rawPredicate("tileX>=$xStart and tileX<=$xEnd and tileY>=$yStart and tileY<=$yEnd")
|
||||
.findAll()
|
||||
@@ -288,7 +288,7 @@ class RealmOperateHelper() {
|
||||
val result = mutableListOf<RenderEntity>()
|
||||
val realm = getRealmDefaultInstance()
|
||||
val realmList = getRealmTools(RenderEntity::class.java, false).and()
|
||||
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK.tableName)
|
||||
.notEqualTo("table", DataCodeEnum.OMDB_RD_LINK.name)
|
||||
.and()
|
||||
.equalTo("properties['${LinkTable.linkPid}']", linkPid).and()
|
||||
.findAll()
|
||||
|
||||
@@ -392,21 +392,23 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
viewModel.liveDataItemList.observe(this) {
|
||||
if (leftFragment == null || leftFragment !is ItemListFragment) {
|
||||
leftFragment = ItemListFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
if(it.isNotEmpty()) {
|
||||
if (leftFragment == null || leftFragment !is ItemListFragment) {
|
||||
leftFragment = ItemListFragment {
|
||||
binding.mainActivityLeftFragment.visibility = View.GONE
|
||||
supportFragmentManager.beginTransaction().remove(leftFragment!!).commit()
|
||||
leftFragment = null
|
||||
null
|
||||
}
|
||||
binding.mainActivityLeftFragment.visibility = View.VISIBLE
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_left_fragment, leftFragment!!)
|
||||
.commit()
|
||||
} else {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.show(leftFragment!!)
|
||||
.commit()
|
||||
}
|
||||
binding.mainActivityLeftFragment.visibility = View.VISIBLE
|
||||
supportFragmentManager.beginTransaction()
|
||||
.replace(R.id.main_activity_left_fragment, leftFragment!!)
|
||||
.commit()
|
||||
} else {
|
||||
supportFragmentManager.beginTransaction()
|
||||
.show(leftFragment!!)
|
||||
.commit()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -610,7 +610,8 @@ class MainViewModel @Inject constructor(
|
||||
val entity =
|
||||
realmOperateHelper.getRealmTools(RenderEntity::class.java, true)
|
||||
.and()
|
||||
.equalTo("table", DataCodeEnum.OMDB_RESTRICTION.tableName).and()
|
||||
.equalTo("table", DataCodeEnum.OMDB_RESTRICTION.name)
|
||||
.and()
|
||||
.equalTo(
|
||||
"properties['linkIn']", it
|
||||
).findFirst()
|
||||
@@ -619,7 +620,7 @@ class MainViewModel @Inject constructor(
|
||||
val linkOutEntity =
|
||||
realmOperateHelper.getRealmTools(RenderEntity::class.java, true)
|
||||
.and()
|
||||
.equalTo("table", DataCodeEnum.OMDB_RD_LINK.tableName).and()
|
||||
.equalTo("table", DataCodeEnum.OMDB_RD_LINK.name).and()
|
||||
.equalTo(
|
||||
"properties['${RenderEntity.Companion.LinkTable.linkPid}']",
|
||||
outLink
|
||||
|
||||
@@ -62,28 +62,14 @@ class SignMoreInfoFragment : BaseFragment() {
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getLaneBoundaryTypeInfo(it))
|
||||
}
|
||||
//可变点限速
|
||||
DataCodeEnum.OMDB_LINK_SPEEDLIMIT_VAR.code -> {
|
||||
val adapter = TwoItemAdapter()
|
||||
DataCodeEnum.OMDB_INTERSECTION.code->{
|
||||
val adapter = LaneBoundaryAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getChangeLimitSpeedInfo(it))
|
||||
}
|
||||
//常规点限速
|
||||
DataCodeEnum.OMDB_SPEEDLIMIT.code -> {
|
||||
val adapter = TwoItemAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getSpeedLimitMoreInfoText(it))
|
||||
}
|
||||
//条件点限速
|
||||
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code -> {
|
||||
val adapter = TwoItemAdapter()
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
adapter.refreshData(SignUtil.getConditionLimitMoreInfoText(it))
|
||||
adapter.refreshData(SignUtil.getIntersectionInfo(it))
|
||||
}
|
||||
//电子眼
|
||||
DataCodeEnum.OMDB_ELECTRONICEYE.code
|
||||
-> {
|
||||
val drawable = resources.getDrawable(R.drawable.icon_electronic_eye_left, null);
|
||||
DataCodeEnum.OMDB_ELECTRONICEYE.code -> {
|
||||
val drawable = resources.getDrawable(R.drawable.icon_electronic_eye_left, null)
|
||||
drawable.setBounds(
|
||||
0,
|
||||
0,
|
||||
@@ -98,7 +84,7 @@ class SignMoreInfoFragment : BaseFragment() {
|
||||
adapter.refreshData(SignUtil.getElectronicEyeMoreInfo(it))
|
||||
}
|
||||
else -> {
|
||||
val adapter = TwoItemAdapter()
|
||||
val adapter = SignUtil.getMoreInfoAdapter(it)
|
||||
binding.signInfoRecyclerview.adapter = adapter
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.navinfo.omqs.bean.RoadNameBean
|
||||
import com.navinfo.omqs.bean.SignBean
|
||||
import com.navinfo.omqs.ui.activity.map.LaneInfoItem
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.LaneBoundaryItem
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.TwoItemAdapter
|
||||
import com.navinfo.omqs.ui.fragment.signMoreInfo.TwoItemAdapterItem
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
@@ -71,7 +72,7 @@ class SignUtil {
|
||||
DataCodeEnum.OMDB_LINK_FORM2_11.code -> "风景路"
|
||||
DataCodeEnum.OMDB_LINK_FORM2_12.code -> "测试路"
|
||||
DataCodeEnum.OMDB_LINK_FORM2_13.code -> "驾考路"
|
||||
DataCodeEnum.OMDB_VIADUCT.code->"高架"
|
||||
DataCodeEnum.OMDB_VIADUCT.code -> "高架"
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
@@ -239,11 +240,64 @@ class SignUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路口详细信息
|
||||
*/
|
||||
|
||||
fun getIntersectionInfo(renderEntity: RenderEntity): List<LaneBoundaryItem> {
|
||||
val list = mutableListOf<LaneBoundaryItem>()
|
||||
list.add(
|
||||
LaneBoundaryItem(
|
||||
"路口号码",
|
||||
"${renderEntity.properties["intersectionPid"]}",
|
||||
null
|
||||
)
|
||||
)
|
||||
val type = when (renderEntity.properties["type"]) {
|
||||
"0" -> "简单路口"
|
||||
"1" -> "复合路口"
|
||||
else -> ""
|
||||
}
|
||||
list.add(LaneBoundaryItem("路口类型", type, null))
|
||||
try {
|
||||
val linkList = renderEntity.properties["linkList"]
|
||||
if (linkList != null && linkList != "" && linkList != "null") {
|
||||
val itemList = mutableListOf<TwoItemAdapterItem>()
|
||||
val jsonArray = JSONArray(linkList)
|
||||
for (i in 0 until jsonArray.length()) {
|
||||
val arrayObject: JSONObject = jsonArray[i] as JSONObject
|
||||
val direct = when (arrayObject.getInt("direct")) {
|
||||
2 -> "顺方向"
|
||||
3 -> "逆方向"
|
||||
else -> ""
|
||||
}
|
||||
itemList.add(TwoItemAdapterItem("方向", direct))
|
||||
val featureType = when (arrayObject.getInt("featureType")) {
|
||||
1 -> "LINK"
|
||||
2 -> "LINK PA"
|
||||
else -> ""
|
||||
}
|
||||
itemList.add(TwoItemAdapterItem("要素类型", featureType))
|
||||
|
||||
list.add(
|
||||
LaneBoundaryItem(
|
||||
"车道标线序号${arrayObject.getInt("markSeqNum")}",
|
||||
null,
|
||||
itemList
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取车道边界类型详细信息
|
||||
*/
|
||||
|
||||
fun getLaneBoundaryTypeInfo(renderEntity: RenderEntity): List<LaneBoundaryItem> {
|
||||
val list = mutableListOf<LaneBoundaryItem>()
|
||||
list.add(LaneBoundaryItem("车道边界线ID", "${renderEntity.properties["featurePid"]}", null))
|
||||
@@ -495,6 +549,26 @@ class SignUtil {
|
||||
title = "最低限速值(km/h)", text = getSpeedLimitMinText(renderEntity)
|
||||
)
|
||||
)
|
||||
val direct = renderEntity.properties["direct"]
|
||||
var str = ""
|
||||
if (direct == "2") {
|
||||
str = "顺方向"
|
||||
} else if (direct == "3") {
|
||||
str = "逆方向"
|
||||
}
|
||||
if (str != "") {
|
||||
list.add(TwoItemAdapterItem(title = "限速方向", text = str))
|
||||
}
|
||||
val speedFlag = renderEntity.properties["speedFlag"]
|
||||
var flag = ""
|
||||
if (speedFlag == "0") {
|
||||
flag = "限速开始"
|
||||
} else if (speedFlag == "1") {
|
||||
flag = "限速解除"
|
||||
}
|
||||
if (flag != "") {
|
||||
list.add(TwoItemAdapterItem(title = "限速标志", text = flag))
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
@@ -612,23 +686,37 @@ class SignUtil {
|
||||
return R.drawable.icon_road_direction
|
||||
}
|
||||
|
||||
private fun getRoadDirection(data: RenderEntity): Int {
|
||||
try {
|
||||
val direct = data.properties["direct"]
|
||||
return when (direct!!.toInt()) {
|
||||
0 -> R.drawable.icon_road_direction
|
||||
1 -> R.drawable.icon_road_direction
|
||||
2 -> R.drawable.icon_road_direction
|
||||
3 -> R.drawable.icon_road_direction
|
||||
-99 -> R.drawable.icon_road_direction
|
||||
else -> R.drawable.icon_road_direction
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("jingo", "获取道路方向面板ICON出错 $e")
|
||||
/**
|
||||
* 道路方向
|
||||
*/
|
||||
fun getRoadDirectionType(type: Int): String {
|
||||
return when (type) {
|
||||
0 -> "不应用"
|
||||
1 -> "双方向"
|
||||
2 -> "顺方向"
|
||||
3 -> "逆方向"
|
||||
-99 -> "参考PA"
|
||||
else -> "未定义"
|
||||
}
|
||||
return R.drawable.icon_road_direction
|
||||
}
|
||||
|
||||
// private fun getRoadDirection(data: RenderEntity): Int {
|
||||
// try {
|
||||
// val direct = data.properties["direct"]
|
||||
// return when (direct!!.toInt()) {
|
||||
// 0 -> R.drawable.icon_road_direction
|
||||
// 1 -> R.drawable.icon_road_direction
|
||||
// 2 -> R.drawable.icon_road_direction
|
||||
// 3 -> R.drawable.icon_road_direction
|
||||
// -99 -> R.drawable.icon_road_direction
|
||||
// else -> R.drawable.icon_road_direction
|
||||
// }
|
||||
// } catch (e: Exception) {
|
||||
// Log.e("jingo", "获取道路方向面板ICON出错 $e")
|
||||
// }
|
||||
// return R.drawable.icon_road_direction
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取道路播报语音文字
|
||||
*/
|
||||
@@ -812,6 +900,26 @@ class SignUtil {
|
||||
return stringBuffer.toString()
|
||||
}
|
||||
|
||||
fun getKindType(kind: Int): String {
|
||||
return when (kind) {
|
||||
1 -> "高速道路"
|
||||
2 -> "城市道路"
|
||||
3 -> "国道"
|
||||
4 -> "省道"
|
||||
6 -> "县道"
|
||||
7 -> "乡镇村道路"
|
||||
8 -> "其他道路"
|
||||
9 -> "非引导道路"
|
||||
10 -> "步行道路"
|
||||
11 -> "人渡"
|
||||
13 -> "轮渡"
|
||||
15 -> "自行车道路"
|
||||
-99 -> "参考PA"
|
||||
else -> "未定义"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取电子眼类型
|
||||
*/
|
||||
@@ -922,5 +1030,238 @@ class SignUtil {
|
||||
else -> 999
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取更多信息
|
||||
*/
|
||||
fun getMoreInfoAdapter(data: RenderEntity): TwoItemAdapter {
|
||||
val adapter = TwoItemAdapter()
|
||||
val list = mutableListOf<TwoItemAdapterItem>()
|
||||
when (data.code) {
|
||||
DataCodeEnum.OMDB_LINK_SPEEDLIMIT_VAR.code ->
|
||||
list.addAll(getChangeLimitSpeedInfo(data))
|
||||
//常规点限速
|
||||
DataCodeEnum.OMDB_SPEEDLIMIT.code ->
|
||||
list.addAll(getSpeedLimitMoreInfoText(data))
|
||||
|
||||
//条件点限速
|
||||
DataCodeEnum.OMDB_SPEEDLIMIT_COND.code ->
|
||||
list.addAll(getConditionLimitMoreInfoText(data))
|
||||
//到路线
|
||||
DataCodeEnum.OMDB_RD_LINK.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "linkPid", text = "${data.properties["linkPid"]}"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "起点号码", text = "${data.properties["snodePid"]}"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "终点号码", text = "${data.properties["enodePid"]}"
|
||||
)
|
||||
)
|
||||
}
|
||||
//种别
|
||||
DataCodeEnum.OMDB_RD_LINK_KIND.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "linkPid", text = "${data.properties["linkPid"]}"
|
||||
)
|
||||
)
|
||||
try {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "种别",
|
||||
text = "${getKindType(data.properties["kind"]!!.toInt())}"
|
||||
)
|
||||
)
|
||||
} catch (e: Throwable) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//道路方向
|
||||
DataCodeEnum.OMDB_LINK_DIRECT.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "linkPid", text = "${data.properties["linkPid"]}"
|
||||
)
|
||||
)
|
||||
try {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "通行方向",
|
||||
text = "${getRoadDirectionType(data.properties["direct"]!!.toInt())}"
|
||||
)
|
||||
)
|
||||
} catch (e: Throwable) {
|
||||
|
||||
}
|
||||
}
|
||||
DataCodeEnum.OMDB_RESTRICTION.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "linkIn",
|
||||
text = "${data.properties["linkIn"]}"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "linkOut",
|
||||
text = "${data.properties["linkOut"]}"
|
||||
)
|
||||
)
|
||||
}
|
||||
DataCodeEnum.OMDB_RD_LINK_FUNCTION_CLASS.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "功能等级",
|
||||
text = "等级${data.properties["functionClass"]}"
|
||||
)
|
||||
)
|
||||
}
|
||||
DataCodeEnum.OMDB_LINK_SPEEDLIMIT.code -> {
|
||||
val direction = data.properties["direction"]
|
||||
var dir = ""
|
||||
if (direction == "2") {
|
||||
dir = "顺方向"
|
||||
} else if (direction == "3") {
|
||||
dir = "逆方向"
|
||||
}
|
||||
if (dir != "") {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "限速方向",
|
||||
text = dir
|
||||
)
|
||||
)
|
||||
}
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "最高限速值(km/h)",
|
||||
text = "${data.properties["maxSpeed"]}"
|
||||
)
|
||||
)
|
||||
var maxStr = when (data.properties["maxSpeedSource"]) {
|
||||
"0" -> {
|
||||
"不应用"
|
||||
}
|
||||
"1" -> {
|
||||
"现场"
|
||||
}
|
||||
"2" -> {
|
||||
"理论"
|
||||
}
|
||||
else -> ""
|
||||
}
|
||||
if (maxStr != "") {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "最高限速来源",
|
||||
text = maxStr
|
||||
)
|
||||
)
|
||||
}
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "最低限速值(km/h)",
|
||||
text = "${data.properties["minSpeed"]}"
|
||||
)
|
||||
)
|
||||
var minStr = when (data.properties["minSpeedSource"]) {
|
||||
"0" -> {
|
||||
"不应用"
|
||||
}
|
||||
"1" -> {
|
||||
"现场"
|
||||
}
|
||||
"2" -> {
|
||||
"理论"
|
||||
}
|
||||
else -> ""
|
||||
}
|
||||
if (minStr != "") {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "最低限速来源",
|
||||
text = minStr
|
||||
)
|
||||
)
|
||||
}
|
||||
var isLaneDependent = when (data.properties["isLaneDependent"]) {
|
||||
"0" -> {
|
||||
"否"
|
||||
}
|
||||
"1" -> {
|
||||
"是"
|
||||
}
|
||||
else -> ""
|
||||
}
|
||||
if (isLaneDependent != "") {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "是否车道依赖",
|
||||
text = isLaneDependent
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
DataCodeEnum.OMDB_LANE_NUM.code -> {
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "车道总数",
|
||||
text = "${data.properties["laneNum"]}"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "顺方向车道数",
|
||||
text = "${data.properties["laneS2e"]}"
|
||||
)
|
||||
)
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "逆方向车道数",
|
||||
text = "${data.properties["laneE2s"]}"
|
||||
)
|
||||
)
|
||||
var str = when (data.properties["laneClass"]) {
|
||||
"0" -> "未赋值"
|
||||
"1" -> "一条车道"
|
||||
"2" -> "两或三条"
|
||||
"3" -> "四条及以上"
|
||||
"-99" -> "参考PA"
|
||||
else -> ""
|
||||
}
|
||||
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "车道数等级",
|
||||
text = str
|
||||
)
|
||||
)
|
||||
}
|
||||
DataCodeEnum.OMDB_INTERSECTION.code -> {
|
||||
val type = when (data.properties["type"]) {
|
||||
"0" -> "简单路口"
|
||||
"1" -> "复合路口"
|
||||
else -> ""
|
||||
}
|
||||
list.add(
|
||||
TwoItemAdapterItem(
|
||||
title = "路口类型",
|
||||
text = type
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
adapter.data = list
|
||||
return adapter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
BIN
app/src/main/res/drawable-xxhdpi/hide_line.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/hide_line.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 867 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/icon_hide_line" android:state_selected="true"></item>
|
||||
<item android:drawable="@drawable/icon_high_line" />
|
||||
<item android:drawable="@drawable/icon_high_line" android:state_selected="true"></item>
|
||||
<item android:drawable="@drawable/icon_hide_line" />
|
||||
</selector>
|
||||
@@ -82,14 +82,14 @@
|
||||
android:id="@+id/main_activity_top_sign_recyclerview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="220dp"
|
||||
android:layout_marginLeft="300dp"
|
||||
android:layout_marginTop="2dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/main_activity_sign_more_info_fragment"
|
||||
android:layout_width="240dp"
|
||||
android:layout_width="220dp"
|
||||
android:layout_height="300dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:minHeight="140dp"
|
||||
@@ -235,6 +235,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape_road_name_bg"
|
||||
android:onClick="@{()->mainActivity.openRoadNameFragment()}"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="10dp"
|
||||
|
||||
Reference in New Issue
Block a user