请问一下您是怎么解决的,我通过鼠标事件能获取,但是我只传经纬度进去earthPosition是undefined,经纬度转成了窗口坐标 let canvasPosition=this.viewer.scene.cartesianToCanvasCoordinates(Cesium.Cartesian3.fromDegrees(101.11119, 30.0111111))
var earthPosition = this.viewer.scene.pickPosition(canvasPosition);
console.log(canvasPosition)
console.log(earthPosition)
if(Cesium.defined(earthPosition)){
var cartographic = Cesium.Cartographic.fromCartesian(earthPosition);
var lon_f = Cesium.Math.toDegrees(cartographic.longitude); //lon
var lat_f = Cesium.Math.toDegrees(cartographic.latitude); //lat
var po_hig = cartographic.height;//这个就是获取的模型上的高度
console.log(po_hig)
}
这样写有什么问题吗