fix: 合并代码
@ -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
After Width: | Height: | Size: 867 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.8 KiB |
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"
|
||||
|
@ -1968,9 +1968,9 @@
|
||||
<m k="type" v="node">
|
||||
<symbol src="assets:symbols/dot_blue_dark.svg"></symbol>
|
||||
</m>
|
||||
<m k="intersectionPid">
|
||||
<!-- <m k="intersectionPid">
|
||||
<symbol src="assets:symbols/dot_magenta.svg"></symbol>
|
||||
</m>
|
||||
</m>-->
|
||||
<!-- <m k="geometry">
|
||||
<symbol src="@typesrc"></symbol>
|
||||
</m>-->
|
||||
@ -1987,12 +1987,23 @@
|
||||
</m>
|
||||
|
||||
<!-- 检查点 -->
|
||||
<m v="OMDB_CHECKPOINT">
|
||||
<m v="OMDB_NODE_FORM">
|
||||
<symbol src="assets:omdb/icon_1012_0.svg" symbol-height="56"
|
||||
symbol-width="56"></symbol>
|
||||
</m>
|
||||
|
||||
|
||||
<!-- 铁路路口 -->
|
||||
<m v="OMDB_NODE_FORM">
|
||||
<symbol src="assets:omdb/icon_1007_0.svg" symbol-height="56"
|
||||
symbol-width="56"></symbol>
|
||||
</m>
|
||||
<!-- 铁路路口 -->
|
||||
<m v="OMDB_NODE_PA">
|
||||
<symbol src="assets:omdb/icon_1007_0.svg" symbol-height="56"
|
||||
symbol-width="56"></symbol>
|
||||
</m>
|
||||
|
||||
<!-- 道路边界类型 -->
|
||||
<m v="OMDB_RDBOUND_BOUNDARYTYPE">
|
||||
<outline-layer id="boundaryType" stroke="#8e44ad" width="0.1" />
|
||||
@ -2068,10 +2079,12 @@
|
||||
</m>
|
||||
</m>
|
||||
</m>
|
||||
<!--护栏-->
|
||||
<m k="boundaryType" v="4">
|
||||
<line stroke="#FFBC6E" use="boundaryType" width="0.1"/>
|
||||
<symbol repeat-gap="12" repeat="true" repeat-start="0" src="assets:omdb/icon_2013_4.svg" symbol-width="16" symbol-height="46"></symbol>
|
||||
</m>
|
||||
<!--路牙-->
|
||||
<m k="boundaryType" v="3">
|
||||
<symbol repeat="true" repeat-gap="4" repeat-start="0" src="assets:omdb/icon_2013_3.svg" symbol-width="10" symbol-height="8"></symbol>
|
||||
</m>
|
||||
@ -2186,6 +2199,28 @@
|
||||
<symbol repeat="true" repeat-start="0" repeat-gap="32" src="assets:omdb/icon_2204_0.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<!-- 停止位置 -->
|
||||
<m v="OMDB_OBJECT_STOPLOCATION">
|
||||
|
||||
<m k="locationType" v="1">
|
||||
<m k="color" v="1">
|
||||
<line stroke="#ffffff" repeat-start="2" use="boundaryType" width="0.1"/>
|
||||
</m>
|
||||
<m k="color" v="9">
|
||||
<line stroke="#eccc68" repeat-start="2" use="boundaryType" width="0.1"/>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
<m k="locationType" v="2">
|
||||
<m k="color" v="1">
|
||||
<symbol repeat="true" repeat-gap="1" repeat-start="2" src="assets:omdb/icon_3016_0.svg" symbol-width="5" symbol-height="24"></symbol>
|
||||
</m>
|
||||
<m k="color" v="9">
|
||||
<symbol repeat="true" repeat-gap="1" repeat-start="2" src="assets:omdb/icon_3016_1.svg" symbol-width="5" symbol-height="24"></symbol>
|
||||
</m>
|
||||
</m>
|
||||
</m>
|
||||
|
||||
<!--常规点限速-->
|
||||
<m v="OMDB_SPEEDLIMIT">
|
||||
<m k="speedFlag" v="0">
|
||||
|
1
collect-library/src/main/assets/omdb/icon_1007_0.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" width="124.7" height="124.7" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 124.7 124.7"><defs><style>.h{fill:url(#f);}.i{fill:#eb0c00;}.j{fill:#fff;}.k,.l{fill:#535a60;}.m{fill:#262d34;isolation:isolate;opacity:.2;}.n{fill:url(#g);stroke:#8b9fae;stroke-miterlimit:10;stroke-width:1px;}.l{opacity:0;}</style><linearGradient id="f" x1="60.1" y1="50.7" x2="64.9" y2="50.7" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#989898"/><stop offset="0" stop-color="#a3a3a3"/><stop offset=".1" stop-color="#c4c5c5"/><stop offset=".2" stop-color="#d8d9d9"/><stop offset=".3" stop-color="#e0e1e1"/><stop offset=".4" stop-color="#dbdcdc"/><stop offset=".5" stop-color="#cccece"/><stop offset=".6" stop-color="#b5b6b7"/><stop offset=".7" stop-color="#949697"/><stop offset=".8" stop-color="#6a6c6f"/><stop offset=".8" stop-color="#3f4246"/><stop offset="1" stop-color="#404247"/><stop offset="1" stop-color="#43434a"/></linearGradient><linearGradient id="g" x1="-33" y1="219.1" x2="13.4" y2="219.1" gradientTransform="translate(-144.3 -36.2) rotate(-76.1)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#afbacb"/><stop offset=".1" stop-color="#c1ccda"/><stop offset=".4" stop-color="#d9e6f0"/><stop offset=".5" stop-color="#e3f0f8"/><stop offset=".6" stop-color="#dde9f2"/><stop offset=".8" stop-color="#ccd8e4"/><stop offset="1" stop-color="#b1bbcc"/><stop offset="1" stop-color="#aeb8c9"/></linearGradient></defs><g id="c"><rect class="l" width="124.7" height="124.7"/><g><ellipse id="d" class="m" cx="62.4" cy="62.1" rx="14.4" ry="3.7"/><ellipse id="e" class="k" cx="62.4" cy="62.1" rx="7.5" ry="3"/><path class="h" d="M62.4,38.6h0c1.4,0,2.6,1.2,2.6,2.6v19.2c0,1.4-1.1,2.5-2.5,2.5h-.3c-1.4,0-2.5-1.1-2.5-2.5v-19.3c0-1.4,1.2-2.6,2.6-2.6Z"/><g><path class="n" d="M64.8,2.6l22.1,36.4c1.1,1.9-.2,4.3-2.4,4.3H40.3c-2.2,0-3.6-2.4-2.4-4.3L59.9,2.6c1.1-1.8,3.7-1.8,4.8,0Z"/><g><path class="j" d="M40.4,41.7c-.3,0-.4-.2-.5-.3,0-.1-.1-.4,0-.6L61.8,5.9c.1-.2,.3-.3,.5-.3s.4,0,.5,.3l21.8,34.9c.2,.2,0,.5,0,.6,0,.1-.2,.3-.5,.3H40.4Z"/><path class="i" d="M62.3,9.4l18.8,30.1H43.4L62.3,9.4m0-6c-.9,0-1.8,.4-2.4,1.3l-21.8,34.9c-1.2,1.9,.2,4.3,2.4,4.3h43.7c2.2,0,3.6-2.5,2.4-4.3L64.7,4.8c-.6-.9-1.5-1.3-2.4-1.3h0Z"/></g></g><g><circle cx="57" cy="36.7" r="1.3"/><circle cx="61.6" cy="36.7" r="1.3"/><circle cx="66.4" cy="36.7" r="1.3"/><path d="M65.4,20c-.3,0-.6,0-.9,.2-.4-.6-1-1-1.8-1s-1.5,.4-1.8,1.1c-.2,0-.4,0-.6,0-1.8,0-3.2,1.4-3.2,3.2s0,.8,.2,1.2c-.1,0-.3,0-.4,0-.8,0-1.4,.6-1.4,1.4s0,.2,0,.3c-.4,.1-.7,.5-.7,1s.5,1,1,1,1-.4,1-.9c0,0,0,0,0,0,.4,0,.8-.2,1.1-.5,.2,.5,.7,.9,1.4,.9s1.3-.5,1.4-1.1c1.3-.2,2.4-1.3,2.6-2.6,.4,.6,1.2,1,2,1,1.3,0,2.4-1.1,2.4-2.4,0-1.3-1.1-2.4-2.4-2.4Z"/><path d="M53.8,30.3s-.3,1.4-.3,2.5,.3,2.6,.3,2.6h-.4v.8h2.1v-1.1h12.4v1.1h3.4v-1.2h-.5v-5h.5v-.7h-5.2v1h-1.2v-.3c0-.4-.3-.7-.7-.7s-.7,.3-.7,.7v.3h-1.8c0-.4-.3-.7-.7-.7s-.7,.3-.7,.7h-3.9v-1.6h-1.7v1.6"/></g></g></g></svg>
|
After Width: | Height: | Size: 2.9 KiB |
1
collect-library/src/main/assets/omdb/icon_3016_0.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692587943200" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6322" width="10" height="10" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M128 479.9488h768.0512v-64H128zM128 607.9488h768.0512v-64H128z" fill="#ffffff" p-id="6323"></path></svg>
|
After Width: | Height: | Size: 435 B |
1
collect-library/src/main/assets/omdb/icon_3016_1.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1692588290872" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6617" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10"><path d="M128 479.9488h768.0512v-64H128zM128 607.9488h768.0512v-64H128z" fill="#eccc68" p-id="6618"></path></svg>
|
After Width: | Height: | Size: 435 B |
8
collect-library/src/main/assets/omdb/icon_3016_3.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg t="1692587943200" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="6322" width="10" height="10"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<path d="M128 479.9488h768.0512v-64H128zM128 607.9488h768.0512v-64H128z" fill="#ffffff"
|
||||
p-id="6323"></path>
|
||||
</svg>
|
After Width: | Height: | Size: 462 B |
@ -4,6 +4,8 @@ package com.navinfo.collect.library.enums
|
||||
* 要素枚举定义
|
||||
* */
|
||||
enum class DataCodeEnum(var tableName: String, var code: String) {
|
||||
OMDB_NODE_FORM("点形态", "1007"),
|
||||
OMDB_NODE_PA("点形态PA", "1007"),
|
||||
OMDB_CHECKPOINT("检查点", "1012"),
|
||||
OMDB_RD_LINK("道路线", "2001"),
|
||||
OMDB_RD_LINK_FUNCTION_CLASS("道路功能等级", "2002"),
|
||||
@ -53,6 +55,7 @@ enum class DataCodeEnum(var tableName: String, var code: String) {
|
||||
OMDB_LINK_FORM2_11("风景路线", "2206-11"),
|
||||
OMDB_LINK_FORM2_12("车辆测试路段", "2206-12"),
|
||||
OMDB_LINK_FORM2_13("驾照考试路段", "2206-13"),
|
||||
OMDB_OBJECT_STOPLOCATION("停止位置", "3016"),
|
||||
OMDB_INTERSECTION("路口", "4001"),
|
||||
OMDB_SPEEDLIMIT("常规点限速", "4002"),
|
||||
OMDB_SPEEDLIMIT_COND("条件点限速", "4003"),
|
||||
|
@ -57,9 +57,9 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
||||
mMapView.vtmMap,
|
||||
Style.builder()
|
||||
// .stippleColor(context.resources.getColor(R.color.draw_line_red_color, null))
|
||||
.fillColor(context.resources.getColor(R.color.draw_line_red_color))
|
||||
.fillColor(context.resources.getColor(R.color.draw_line_pink_color))
|
||||
.fillAlpha(0.5f)
|
||||
.strokeColor(context.resources.getColor(R.color.draw_line_red_color))
|
||||
.strokeColor(context.resources.getColor(R.color.draw_line_pink_color))
|
||||
.strokeWidth(3f)
|
||||
.fixed(true).build()
|
||||
)
|
||||
|
@ -8,6 +8,7 @@
|
||||
<color name="draw_line_blue1_color" comment="线数据样式">#028FFF</color>
|
||||
<color name="draw_line_blue2_color" comment="线数据样式">#4E55AF</color>
|
||||
<color name="draw_line_red_color" comment="线数据样式">#FFF6565D</color>
|
||||
<color name="draw_line_pink_color" comment="线数据样式">#FFd4237a</color>
|
||||
<color name="default_red" comment="应用主要色调">#F03736</color>
|
||||
<color name="draw_area_color" comment="测量面积渲染颜色">#8DEF08EB</color>
|
||||
|
||||
|