Cesium屏幕坐标转经纬度

    let cartesian = viewer.scene.pickPosition(movement.position);
            if (Cesium.defined(cartesian)) {
              // // 空间坐标转世界坐标(弧度)
              let cartographic = Cesium.Cartographic.fromCartesian(cartesian);
              // 弧度转为角度(经纬度)
              let lon = Cesium.Math.toDegrees(cartographic.longitude);
              let lat = Cesium.Math.toDegrees(cartographic.latitude);
              //模型高度
              let height = cartographic.height;
              let start = [lon, lat]
              window.cesiumEasy.getTracklinestartpos(start)

              // console.log('模型表面的经纬度高程是:', { x: lon, y: lat, height: height })
            }

你可能感兴趣的:(cesium,前端,vue.js)