【GIS】Cesium坐标
作者:互联网
//屏幕坐标
var pick = viewer.scene.pick(movement.position)
//笛卡尔空间直角坐标系
var cartesian = viewer.camera.pickEllipsoid(movement.position, viewer.scene.globe.ellipsoid)
//创建
new Cesium.Cartesian3(x, y, z)
//WGS84弧度坐标系(Cartographic)
var cartographic = Cesium.Cartographic.fromCartesian(cartesian)
//WGS84经纬度坐标系(Cartographic)
var lon = Cesium.Math.toDegrees(cartographic.longitude).toFixed(5)
var lat = Cesium.Math.toDegrees(cartographic.latitude).toFixed(5)
var radians=Cesium.Math.toRadians(degrees);//经纬度转弧度
var degrees=Cesium.Math.toDegrees(radians);//弧度转经纬度
//方法一:
var longitude = Cesium.Math.toRadians(longitude1); //其中 longitude1为角度
var latitude= Cesium.Math.toRadians(latitude1); //其中 latitude1为角度
var cartographic = new Cesium.Cartographic(longitude, latitude, height);
//方法二:
var cartographic= Cesium.Cartographic.fromDegrees(longitude, latitude, height);//其中,longitude和latitude为角度
//方法三:
var cartographic= Cesium.Cartographic.fromRadians(longitude, latitude, height);//其中,longitude和latitude为弧度
标签:GIS,latitude,Cartographic,longitude,var,坐标,Cesium,Math 来源: https://www.cnblogs.com/defineconst/p/13121100.html