mergecode

This commit is contained in:
qiji4215
2023-09-21 09:55:14 +08:00
parent 2eb8528f98
commit 121a8cf39c
5 changed files with 57 additions and 1 deletions

View File

@@ -220,6 +220,7 @@
"zoomMin": 18,
"zoomMax": 20,
"is3D": true,
"catch":true,
"transformer": [
{
"k": "geometry",

View File

@@ -96,6 +96,12 @@ class SignMoreInfoFragment : BaseFragment() {
binding.signInfoRecyclerview.adapter = adapter
adapter.refreshData(SignUtil.getElectronicEyeMoreInfo(it))
}
//交通标牌
DataCodeEnum.OMDB_TRAFFIC_SIGN.code -> {
val adapter = TwoItemAdapter()
binding.signInfoRecyclerview.adapter = adapter
adapter.refreshData(SignUtil.getTrafficSignMoreInfo(it))
}
else -> {
val adapter = SignUtil.getMoreInfoAdapter(it)
binding.signInfoRecyclerview.adapter = adapter

View File

@@ -1596,7 +1596,54 @@ class SignUtil {
return list
}
/**
* 获取交通标牌详细信息
*/
fun getTrafficSignMoreInfo(renderEntity: RenderEntity): List<TwoItemAdapterItem> {
val list = mutableListOf<TwoItemAdapterItem>()
val trafsignShape = when (renderEntity.properties["trafsignShape"]) {
"1" -> "不规则形状"
"2" -> "长方形"
"3" -> "三角形"
"4" -> "圆形"
"5" -> "菱形"
"6" -> "到三角形"
"7" -> "正方形"
"8" -> "八角形"
else -> ""
}
if (trafsignShape != "") {
list.add(
TwoItemAdapterItem(
title = "形状", text = trafsignShape
)
)
}
val color = when (renderEntity.properties["color"]) {
"0" -> "未验证"
"1" -> "白色"
"2" -> "黄色"
"3" -> "红色"
"5" -> "棕色"
"6" -> "蓝色"
"7" -> "绿色"
"8" -> "黑色"
"9" -> "其他"
else -> ""
}
list.add(
TwoItemAdapterItem(
title = "颜色", text = color
)
)
list.add(
TwoItemAdapterItem(
title = "正北夹角", text = "${renderEntity.properties["heading"]}"
)
)
return list
}
}
}