feat: 引入通行车辆类型Lane类型数据,增加对应渲染原则
This commit is contained in:
parent
dbf4108979
commit
00515cfe37
@ -182,6 +182,24 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"2638":{
|
||||
"table": "OMDB_LANE_ACCESS",
|
||||
"code": 2638,
|
||||
"name": "通行车辆类型Lane",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 20,
|
||||
"catch":true,
|
||||
"filterData": false,
|
||||
"checkLinkId": false,
|
||||
"transformer": [
|
||||
{
|
||||
"k": "geometry",
|
||||
"v": "~",
|
||||
"klib": "geometry",
|
||||
"vlib": "generateLaneAccessType()"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3001":{
|
||||
"table": "OMDB_OBJECT_OH_STRUCT",
|
||||
"code": 3001,
|
||||
|
@ -752,9 +752,9 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
Realm.getInstance(currentInstallTaskConfig)
|
||||
.insert(renderEntity)
|
||||
Log.d("ImportOMDBHelper", "解析===2insert")
|
||||
}
|
||||
if (currentConfig.code == DataCodeEnum.OMDB_RD_LINK.code.toInt()) {
|
||||
listResult.add(renderEntity)
|
||||
if (currentConfig.code == DataCodeEnum.OMDB_RD_LINK.code.toInt()) {
|
||||
listResult.add(renderEntity)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -895,4 +895,41 @@ class ImportPreProcess {
|
||||
renderEntity.geometry = GeometryTools.createGeometry(GeoPoint(centerPoint!!.y, centerPoint.x)).toString()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成通行车辆类型Lane的渲染名称字段
|
||||
* */
|
||||
fun generateLaneAccessType(renderEntity: RenderEntity): Boolean {
|
||||
if (renderEntity.properties.containsKey("accessCharacteristic")) {
|
||||
// 解析accessCharacteristic,判断是否存在指定属性
|
||||
val accessCharacteristic = renderEntity.properties["accessCharacteristic"].toString().toInt()
|
||||
var str = ""
|
||||
if (accessCharacteristic.and(4)>0) {
|
||||
str += "公"
|
||||
}
|
||||
if (accessCharacteristic.and(8)>0) {
|
||||
if (str.isNotEmpty()) {
|
||||
str += "|"
|
||||
}
|
||||
str += "多"
|
||||
}
|
||||
if (accessCharacteristic.and(64)>0) {
|
||||
if (str.isNotEmpty()) {
|
||||
str += "|"
|
||||
}
|
||||
str += "行"
|
||||
}
|
||||
if (accessCharacteristic.and(128)>0) {
|
||||
if (str.isNotEmpty()) {
|
||||
str += "|"
|
||||
}
|
||||
str += "自"
|
||||
}
|
||||
if (str.isNotEmpty()) {
|
||||
renderEntity.properties["name"] = str
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
@ -182,7 +182,7 @@ class PersonalCenterFragment(private var indoorDataListener: ((Boolean) -> Unit?
|
||||
// 定位到指定位置
|
||||
niMapController.mMapView.vtmMap.animator()
|
||||
// .animateTo(GeoPoint( 40.05108004733645, 116.29187746293708 ))
|
||||
.animateTo(GeoPoint(40.0882756, 116.3033581))
|
||||
.animateTo(GeoPoint(39.617824808620675, 115.52374142452308))
|
||||
}
|
||||
|
||||
R.id.personal_center_menu_open_all_layer -> {
|
||||
|
@ -2029,6 +2029,11 @@
|
||||
<symbol repeat="true" repeat-start="0" src="assets:omdb/icon_2017_1.svg"></symbol>
|
||||
</m>
|
||||
|
||||
<!-- 通行车辆类型Lane -->
|
||||
<m v="OMDB_LANE_ACCESS">
|
||||
<text use="road" size="14" stroke="#ffffff" fill="#e7a32d"></text>
|
||||
</m>
|
||||
|
||||
<!-- 车道施工 -->
|
||||
<m v="OMDB_LANE_CONSTRUCTION">
|
||||
<line stroke="#eccc68" width="0.1" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user