增加底图的二三维单独显示

This commit is contained in:
zh
2025-08-13 10:07:15 +08:00
parent ebaa10a79b
commit 20ae03cc5e
3 changed files with 74 additions and 5 deletions

View File

@ -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")
}