This commit is contained in:
zh
2025-12-17 18:06:13 +08:00
parent 61f93a81f2
commit 27543a3eae
18 changed files with 146 additions and 117 deletions

View File

@ -1397,7 +1397,7 @@ class AssembleObject extends Base {
this.previous = null
this.positionEditing = false
if(this._positionEditingCallback) {
if (this._positionEditingCallback) {
this._positionEditingCallback()
this._positionEditingCallback = null
}
@ -1510,7 +1510,7 @@ class AssembleObject extends Base {
return this._areaChangeCallBack
}
set areaChangeCallBack (cd) {
set areaChangeCallBack(cd) {
this._areaChangeCallBack = cd
}
@ -1644,18 +1644,20 @@ class AssembleObject extends Base {
let polygon = turf.polygon(points)
let centroid = turf.pointOnFeature(polygon)
let objectsToExclude = [...this.sdk.viewer.entities.values]
this
.getClampToHeight({
lng: centroid.geometry.coordinates[0],
lat: centroid.geometry.coordinates[1]
}, objectsToExclude)
.then(height => {
this.label.position = [
centroid.geometry.coordinates[0],
centroid.geometry.coordinates[1],
height
]
})
setTimeout(() => {
this
.getClampToHeight({
lng: centroid.geometry.coordinates[0],
lat: centroid.geometry.coordinates[1]
}, objectsToExclude)
.then(height => {
this.label.position = [
centroid.geometry.coordinates[0],
centroid.geometry.coordinates[1],
height
]
})
}, 200);
setTimeout(() => {