解决绘制箭头面时连续获取同样的坐标时面坐标计算异常的问题
This commit is contained in:
@ -59,12 +59,17 @@ export default class DrawAttackArrow extends Draw {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
into = '3D'
|
into = '3D'
|
||||||
|
let pos84 = this.cartesian3Towgs84(cartesian, this.viewer)
|
||||||
|
let lastPos84 = cache_positions[cache_positions.length - 1]
|
||||||
|
if(lastPos84 && (lastPos84.lng === pos84.lng && lastPos84.lat === pos84.lat)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!this.entityHasCreated) {
|
if (!this.entityHasCreated) {
|
||||||
let polyline_id = DrawAttackArrow.create_arrow_polygon(this)
|
let polyline_id = DrawAttackArrow.create_arrow_polygon(this)
|
||||||
this.points_ids.push(polyline_id)
|
this.points_ids.push(polyline_id)
|
||||||
}
|
}
|
||||||
this.points_ids.push(this.create_point(cartesian))
|
this.points_ids.push(this.create_point(cartesian))
|
||||||
cache_positions.push(this.cartesian3Towgs84(cartesian, this.viewer))
|
cache_positions.push(pos84)
|
||||||
isMove = false
|
isMove = false
|
||||||
})
|
})
|
||||||
this.event.mouse_right((movement, cartesian) => {
|
this.event.mouse_right((movement, cartesian) => {
|
||||||
|
Reference in New Issue
Block a user