优化贴地距离测量

This commit is contained in:
zh
2025-08-21 16:36:50 +08:00
parent dd1c7acde1
commit 71988d8833

View File

@ -91,7 +91,7 @@ class MeasureDistance extends Measure {
//暂时固定取20个点
if (d > 20) {//大于20m时固定取20个点
if (d > 2) {//大于20m时固定取20个点
meters = d / 20
await start(meters)
} else if (d < 1) {
@ -106,8 +106,8 @@ class MeasureDistance extends Measure {
async sampleHeight(p1, index) {
let p2 = await this.sampleHeightMostDetailed([p1])
p1.alt = p2[0].height
let height = await this.getClampToHeight(p1, [...this.sdk.viewer.entities.values])
p1.alt = height
return {position: p1, index}
}