增加底图的二三维单独显示
This commit is contained in:
@ -62,9 +62,11 @@ class Base extends Tools {
|
||||
}
|
||||
|
||||
set showView(v) {
|
||||
|
||||
|
||||
let sdk2D = get2DSdk().sdkD
|
||||
if(!sdk2D) {
|
||||
v=0
|
||||
if (!sdk2D) {
|
||||
v = 0
|
||||
}
|
||||
if (!this.#_showView && !this.show) {
|
||||
return
|
||||
@ -124,10 +126,16 @@ class Base extends Tools {
|
||||
this.originalOptions.show = v
|
||||
}
|
||||
}
|
||||
this.entity._showView = this.showView
|
||||
if (this.type == 'layer') {
|
||||
if (this.entity) {
|
||||
this.entity._objectState = this.options.show
|
||||
}
|
||||
}
|
||||
if (!this.showView || this.showView == 3) {
|
||||
this.entity && (this.entity.show = this.options.show)
|
||||
if (this.options.label && this.options.label.show && this.label) {
|
||||
this.label.show = this.options.show
|
||||
this.label.show = this.options.show
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -138,12 +146,34 @@ class Base extends Tools {
|
||||
}
|
||||
|
||||
if (this._DialogObject && this._DialogObject.showBtn) {
|
||||
this._DialogObject.showBtn.checked = this.options.show
|
||||
this._DialogObject.showBtn.checked = this.options.show
|
||||
}
|
||||
|
||||
|
||||
syncData(this.sdk, this.options.id)
|
||||
syncSplitData(this.sdk, this.options.id)
|
||||
this.isShowView = false
|
||||
|
||||
let { sdkP, sdkD } = get2DSdk()
|
||||
if (this.type == 'layer' && sdkD) {
|
||||
let layer2d = sdkD.viewer.imageryLayers._layers[this.layerIndex]
|
||||
let layer3d = this.entity
|
||||
|
||||
if (!layer2d) {
|
||||
return
|
||||
}
|
||||
if (layer3d._objectState) {
|
||||
if (!layer3d._showView || layer3d._showView == 2) {
|
||||
layer2d.show = true
|
||||
}
|
||||
if (layer3d._showView == 3) {
|
||||
layer2d.show = false
|
||||
}
|
||||
}
|
||||
else {
|
||||
layer2d.show = this.options.show
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.error("参数必须为boolean")
|
||||
}
|
||||
|
Reference in New Issue
Block a user