Compare commits
3 Commits
d7ecd6d865
...
9f35d752c2
Author | SHA1 | Date | |
---|---|---|---|
9f35d752c2 | |||
22f9693957 | |||
e022aa5ef1 |
@ -231,7 +231,11 @@ async function syncData2(sdk, id, entityId) {
|
||||
if (obj.showView == 3) {
|
||||
options.show = false
|
||||
}
|
||||
let target = await new obj.constructor(sdk2D, options)
|
||||
let target = await sdk2D.entityMap.get(options.id)
|
||||
if(target) {
|
||||
await target.remove()
|
||||
}
|
||||
target = await new obj.constructor(sdk2D, options)
|
||||
target.onClick = obj.onClick
|
||||
target.onRightClick = obj.onRightClick
|
||||
target.onMouseMove = obj.onMouseMove
|
||||
|
@ -81,6 +81,16 @@ class GroundImage extends Base {
|
||||
this.create()
|
||||
}
|
||||
|
||||
get name() {
|
||||
return this.options.name
|
||||
}
|
||||
|
||||
set name(v) {
|
||||
super.name = v
|
||||
this.options.label.text = this.options.name
|
||||
this.entity && (this.entity.label.text = this.options.label.text)
|
||||
}
|
||||
|
||||
get mode() {
|
||||
return this.options.mode
|
||||
}
|
||||
|
@ -1526,6 +1526,9 @@ class GroundSvg extends Base {
|
||||
controlPoints[9] = turf.destination(point, wh, 0 + angle, options).geometry.coordinates
|
||||
|
||||
this.controlPoints = controlPoints
|
||||
if(!this.sdk || !this.sdk.viewer) {
|
||||
return
|
||||
}
|
||||
for (let i = 0; i < this.controlPoints.length; i++) {
|
||||
let color = '#00ff0a'
|
||||
if (i === 5) {
|
||||
|
@ -293,7 +293,7 @@ class SectorObject extends Base {
|
||||
return this.options.line.width
|
||||
}
|
||||
set lineWidth(v) {
|
||||
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||
this.options.line.width = ((v || v === 0) ? v : 3)
|
||||
this.entity.polyline.width = this.options.line.width
|
||||
this._elms.lineWidth && this._elms.lineWidth.forEach((item) => {
|
||||
item.value = this.options.line.width
|
||||
@ -1560,7 +1560,7 @@ class SectorObject extends Base {
|
||||
_addRr() {
|
||||
if (this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value) {
|
||||
this.options.attribute.vr.content.push({
|
||||
name: '全景图' ,
|
||||
name: '全景图',
|
||||
url: this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value
|
||||
})
|
||||
this._DialogObject._element.content.getElementsByClassName('vr_add')[0].value = ''
|
||||
@ -1573,7 +1573,7 @@ class SectorObject extends Base {
|
||||
|
||||
addAttributeRr(vr) {
|
||||
this.options.attribute.vr.content.push({
|
||||
name: '全景图' ,
|
||||
name: '全景图',
|
||||
url: vr
|
||||
})
|
||||
this.attributeVr = this.options.attribute.vr.content
|
||||
@ -1922,6 +1922,19 @@ class SectorObject extends Base {
|
||||
that.cartesian3Towgs84(positions[1], that.sdk.viewer),
|
||||
that.cartesian3Towgs84(positions[positions.length - 4], that.sdk.viewer)
|
||||
]
|
||||
let objectsToExclude = [...that.sdk.viewer.entities.values]
|
||||
that
|
||||
.getClampToHeight({
|
||||
lng: that.options.center.lng,
|
||||
lat: that.options.center.lat
|
||||
}, objectsToExclude)
|
||||
.then(height => {
|
||||
that.label.position = [
|
||||
that.options.center.lng,
|
||||
that.options.center.lat,
|
||||
height
|
||||
]
|
||||
})
|
||||
setTimeout(() => {
|
||||
createNodePoints(positions[1], 'sector-start')
|
||||
createNodePoints(positions[positions.length - 4], 'sector-end')
|
||||
|
Reference in New Issue
Block a user