zouyaoji / vue-cesium

🎉 Vue 3.x components for CesiumJS.
https://zouyaoji.top/vue-cesium
MIT License
1.47k stars 317 forks source link

[Bug Report] 关于VcDrawings的编辑,无法调整具有高度的实体 #325

Open JiajiaHuang opened 1 year ago

JiajiaHuang commented 1 year ago

VueCesium version

3.1.1

OS/Browsers version

谷歌浏览器

Vue version

3.2.45

Cesium version

1.100.0

Reproduction Link

https://codepen.io/pen?&prefill_data_id=b8e0f890-ae47-4b7e-bd98-df0e7489e460

Steps to reproduce

可以在官方组件: https://zouyaoji.top/vue-cesium/#/zh-CN/component/analyses/vc-drawings 进行拖动有高度的点,拖动之后点已经贴地。不保存高度。

What is Expected?

按正常的逻辑应该是高度会保持,然后跟随鼠标移动相关到坐标。

What is actually happening?

移动直接到了是地形坐标而且高度为地形高度。

zouyaoji commented 1 year ago

目前不支持哈,目前只有自己给高度。

为什么会这样,因为编辑的时候鼠标是用的scene.pcik方法获取的位置。移动鼠标时候只能拾取到地下或者模型等对象上面,无法拾取到空中的。

如果要实现你说的需求,要像cesiumlab那样通过x、y、z三个方向分别编辑, http://earthsdk.com/v/last/Apps/Examples/?menu=true&url=./earth-pin-editing.html

image

但目前还没精力去弄。

JiajiaHuang commented 1 year ago

感谢您的解答,关于这个功能,感觉超图的demo做的挺好的,可以作为参考: https://www.supermapol.com/earth/vue-iEarth/examples/index.html image 体验感很好,但是实现起来有些难度~

zouyaoji commented 1 year ago

意思是加个支持只编辑Z轴的交互?

JiajiaHuang commented 1 year ago

Z轴的移动单独拎出来的,编辑z轴之后,xy轴是固定的,进行鼠标移动是屏幕的上下方向,且可以位置都能一致。 而且,他这个在三维坐标的x和y轴上的跟随鼠标移动,也是做的细致,用户体验感很好。