解决立体模式下高度修改不生效的问题
This commit is contained in:
@ -793,8 +793,13 @@ class GroundSvg extends Base {
|
||||
heightModeName = '依附模型'
|
||||
break
|
||||
}
|
||||
if (this.entity && this.entity.billboard) {
|
||||
this.entity.billboard.heightReference = heightMode
|
||||
if (this.entity) {
|
||||
if (this.entity.billboard) {
|
||||
this.entity.billboard.heightReference = heightMode
|
||||
}
|
||||
if (this.entity.label) {
|
||||
this.entity.label.heightReference = heightMode
|
||||
}
|
||||
}
|
||||
this._elms.heightMode && (this._elms.heightMode.value = heightModeName)
|
||||
}
|
||||
@ -1386,11 +1391,13 @@ class GroundSvg extends Base {
|
||||
_this.entity = new Cesium.Entity({
|
||||
show: _this.options.show,
|
||||
id: _this.options.id,
|
||||
position: Cesium.Cartesian3.fromDegrees(
|
||||
_this.options.position.lng,
|
||||
_this.options.position.lat,
|
||||
_this.options.position.alt || 0
|
||||
),
|
||||
position: new Cesium.CallbackProperty(() => {
|
||||
return Cesium.Cartesian3.fromDegrees(
|
||||
_this.options.position.lng,
|
||||
_this.options.position.lat,
|
||||
_this.options.position.alt || 0
|
||||
)
|
||||
}),
|
||||
billboard: {
|
||||
show: _this.mode ? true : false,
|
||||
image: canvas,
|
||||
@ -2275,12 +2282,13 @@ class GroundSvg extends Base {
|
||||
this.name = this.originalOptions.name
|
||||
this.angle = this.originalOptions.angle
|
||||
this.scale = this.originalOptions.scale
|
||||
this.color = this.originalOptions.color
|
||||
// this.color = this.originalOptions.color
|
||||
if (this.text && !this.originalOptions.text.position) {
|
||||
this.text.remove()
|
||||
this.text = null
|
||||
}
|
||||
this.attributeLink = this.options.attribute.link.content
|
||||
this.mode = this.originalOptions.mode
|
||||
this.attributeLink = this.originalOptions.attribute.link.content
|
||||
this.textShow = this.originalOptions.text.show
|
||||
this.textValue = this.originalOptions.text.value
|
||||
this.textColor = this.originalOptions.text.color
|
||||
|
Reference in New Issue
Block a user