增加SA/PA渲染原则
This commit is contained in:
parent
5fa01313b4
commit
de86fb57fb
@ -12,7 +12,8 @@
|
||||
"code": 2001,
|
||||
"name": "道路线",
|
||||
"zoomMin": 15,
|
||||
"zoomMax": 17
|
||||
"zoomMax": 17,
|
||||
"checkLinkId": false
|
||||
},
|
||||
"2002": {
|
||||
"table": "OMDB_RD_LINK_FUNCTION_CLASS",
|
||||
@ -111,7 +112,7 @@
|
||||
"name": "全封闭"
|
||||
},
|
||||
"2037": {
|
||||
"table": "OMDB_TAMP",
|
||||
"table": "OMDB_RAMP",
|
||||
"code": 2037,
|
||||
"name": "匝道"
|
||||
},
|
||||
|
@ -265,28 +265,39 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
Log.e("qj","${renderEntity.name}==不包括任务linkPid")
|
||||
}
|
||||
|
||||
//道路属性code编码需要特殊处理 存在多个属性值时,渲染优先级:SA>PA,存在多个属性值时,渲染优先级:FRONTAGE>MAIN_SIDE_A CCESS
|
||||
|
||||
// 对renderEntity做预处理后再保存
|
||||
val resultEntity = importConfig.transformProperties(renderEntity)
|
||||
|
||||
//对code编码需要特殊处理 存在多个属性值时,渲染优先级:SA>PA,存在多个属性值时,渲染优先级:FRONTAGE>MAIN_SIDE_A CCESS
|
||||
if(renderEntity.code == DataCodeEnum.OMDB_LINK_ATTRIBUTE.code){
|
||||
|
||||
var type = renderEntity.properties["SA"]
|
||||
Log.e("qj","道路属性===0")
|
||||
|
||||
var type = renderEntity.properties["sa"]
|
||||
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.code = DataCodeEnum.OMDB_LINK_ATTRIBUTE_SA.code
|
||||
Log.e("qj","道路属性===1")
|
||||
}else{
|
||||
type = renderEntity.properties["PA"]
|
||||
type = renderEntity.properties["pa"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.code = DataCodeEnum.OMDB_LINK_ATTRIBUTE_PA.code
|
||||
Log.e("qj","道路属性===2")
|
||||
} else{
|
||||
type = renderEntity.properties["FRONTAGE"]
|
||||
type = renderEntity.properties["frontage"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.code = DataCodeEnum.OMDB_LINK_ATTRIBUTE_FORNTAGE.code
|
||||
Log.e("qj","道路属性===3")
|
||||
}else{
|
||||
type = renderEntity.properties["MAIN_SIDE_ACCESS"]
|
||||
type = renderEntity.properties["mainSideAccess"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.code = DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code
|
||||
Log.e("qj","道路属性===4")
|
||||
}else{
|
||||
renderEntity.enable=0
|
||||
Log.e("qj","过滤不显示数据${renderEntity.table}")
|
||||
Log.e("qj","道路属性===5")
|
||||
continue
|
||||
}
|
||||
}
|
||||
@ -362,8 +373,7 @@ class ImportOMDBHelper @AssistedInject constructor(
|
||||
}
|
||||
|
||||
listResult.add(renderEntity)
|
||||
// 对renderEntity做预处理后再保存
|
||||
val resultEntity = importConfig.transformProperties(renderEntity)
|
||||
|
||||
if (resultEntity != null) {
|
||||
realm.insert(renderEntity)
|
||||
}
|
||||
|
@ -458,14 +458,30 @@ class ImportPreProcess {
|
||||
fun generateRoadText(renderEntity: RenderEntity) {
|
||||
// 根据类型进行文字转换
|
||||
if (renderEntity.code != null) {
|
||||
if(renderEntity.code==DataCodeEnum.OMDB_LINK_ATTRIBUTE_SA.code){
|
||||
|
||||
var type = renderEntity.properties["sa"]
|
||||
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.properties["name"] = "SA"
|
||||
}else if(renderEntity.code==DataCodeEnum.OMDB_LINK_ATTRIBUTE_PA.code){
|
||||
renderEntity.properties["name"] = "PA"
|
||||
}else if(renderEntity.code==DataCodeEnum.OMDB_LINK_ATTRIBUTE_FORNTAGE.code){
|
||||
renderEntity.properties["name"] = "FRONTAGE"
|
||||
}else if(renderEntity.code==DataCodeEnum.OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS.code){
|
||||
renderEntity.properties["name"] = "MAIN"
|
||||
renderEntity.properties["type"] = "1"
|
||||
}else{
|
||||
type = renderEntity.properties["pa"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.properties["type"] = "2"
|
||||
Log.e("qj","generateRoadText===2")
|
||||
} else{
|
||||
type = renderEntity.properties["frontage"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.properties["name"] = "FRONTAGE"
|
||||
renderEntity.properties["type"] = "3"
|
||||
}else{
|
||||
type = renderEntity.properties["mainSideAccess"]
|
||||
if(type!=null&&type=="1"){
|
||||
renderEntity.properties["name"] = "MAIN"
|
||||
renderEntity.properties["type"] = "4"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -180,7 +180,7 @@
|
||||
width="0.1" />
|
||||
|
||||
<!--道路形态-->
|
||||
<style-line dasharray="8,2,2,2,2,2" id="road_morphology" repeat-gap="3" repeat-start="0" stroke="#fcba5a" width="0.2" />
|
||||
<style-line dasharray="8,2,2,2,2,2" id="road_morphology" repeat-gap="3" repeat-start="0" stroke="#1afa29" width="0.2" />
|
||||
|
||||
<!--###### ASSIGNMENT ######-->
|
||||
|
||||
@ -2121,19 +2121,21 @@
|
||||
<!-- 道路属性 -->
|
||||
<m v="OMDB_LINK_ATTRIBUTE">
|
||||
|
||||
<m k="code" v="OMDB_LINK_ATTRIBUTE_SA">
|
||||
<m k="type" v="1">
|
||||
<text use="road" stroke="#fcba5a" size="16"></text>
|
||||
<line stroke="#1afa29" width="0.25" />
|
||||
</m>
|
||||
|
||||
<m k="code" v="OMDB_LINK_ATTRIBUTE_PA">
|
||||
<m k="type" v="2">
|
||||
<text use="road" stroke="#fcba5a" size="16"></text>
|
||||
<line stroke="#1afa29" width="0.25" />
|
||||
</m>
|
||||
|
||||
<m k="code" v="OMDB_LINK_ATTRIBUTE_FORNTAGE">
|
||||
<m k="type" v="3">
|
||||
<line use="road_morphology" />
|
||||
</m>
|
||||
|
||||
<m k="code" v="OMDB_LINK_ATTRIBUTE_MAIN_SIDE_ACCESS">
|
||||
<m k="type" v="4">
|
||||
<line use="road_morphology" />
|
||||
</m>
|
||||
|
||||
|
@ -60,7 +60,7 @@ class LineHandler(context: AppCompatActivity, mapView: NIMapView) : BaseHandler(
|
||||
.fillColor(context.resources.getColor(R.color.draw_line_red_color))
|
||||
.fillAlpha(0.5f)
|
||||
.strokeColor(context.resources.getColor(R.color.draw_line_red_color))
|
||||
.strokeWidth(8f)
|
||||
.strokeWidth(2f)
|
||||
.fixed(true).build()
|
||||
)
|
||||
addLayer(layer, NIMapView.LAYER_GROUPS.VECTOR)
|
||||
|
Loading…
x
Reference in New Issue
Block a user