This commit is contained in:
2025-11-12 17:34:53 +08:00
parent b4fd967930
commit ae84184bf8
3 changed files with 120 additions and 13 deletions

View File

@ -43,7 +43,7 @@ class ViewShedStage extends Tools {
this.options = {}
this.options.viewPosition = options.viewPosition;
this.options.viewPositionEnd = options.viewPositionEnd;
this.options.horizontalViewAngle = (options.horizontalViewAngle || options.horizontalViewAngle === 0) ? options.horizontalViewAngle : 90.0;
this.options.horizontalViewAngle = (options.horizontalViewAngle || options.horizontalViewAngle === 0) ? options.horizontalViewAngle : 30.0;
this.options.verticalViewAngle = (options.verticalViewAngle || options.verticalViewAngle === 0) ? options.verticalViewAngle : 60.0;
this.options.visibleAreaColor = options.visibleAreaColor || '#008000';
this.options.invisibleAreaColor = options.invisibleAreaColor || '#FF0000';
@ -182,7 +182,7 @@ class ViewShedStage extends Tools {
return pitch
}
static create(that) {
static create(that, callBack) {
that.destroy()
let count = 0;
if (!YJ.Measure.GetMeasureStatus()) {
@ -201,6 +201,7 @@ class ViewShedStage extends Tools {
that.ids.push(ViewShedStage.create_point(that, cartesian))
that.end()
that.update()
callBack(true)
}
})
that.event.mouse_move((movement, cartesian) => {
@ -212,6 +213,7 @@ class ViewShedStage extends Tools {
})
that.ids = []
that.end()
callBack(false)
})
that.event.gesture_pinck_start((movement, cartesian) => {
let startTime = new Date()
@ -223,6 +225,7 @@ class ViewShedStage extends Tools {
})
that.ids = []
that.end()
callBack(false)
}
})
})
@ -232,6 +235,7 @@ class ViewShedStage extends Tools {
text: '上一次测量未结束',
type: 'warning',
});
callBack(false)
}
@ -247,8 +251,8 @@ class ViewShedStage extends Tools {
this.tip = null
this.event = null
}
draw() {
ViewShedStage.create(this)
draw(callBack) {
ViewShedStage.create(this, callBack)
}
static create_point(that, cartesian) {