klren0312 / daliy_knowledge

知识积累,正确使用方式是watch
21 stars 4 forks source link

cesium 世界坐标转经纬度 #830

Open klren0312 opened 5 months ago

klren0312 commented 5 months ago
          const coord = new Cesium.Cartesian3(point[0], point[1], point[2])

          var ellipsoid=viewer.scene.globe.ellipsoid;
          var cartograhphic=ellipsoid.cartesianToCartographic(coord);
          var lat=Cesium.Math.toDegrees(cartograhphic.latitude);
          var lng=Cesium.Math.toDegrees(cartograhphic.longitude);
          var alt=cartograhphic.height;

          console.log(lng, lat, alt)