坐标相关

1.世界坐标

2.经纬度坐标

3.屏幕坐标

4.各个坐标相互转换

5.鼠标点击获取当前视角

// 获取destination 和 orientation

viewer.screenSpaceEventHandler.setInputAction(function onLeftClick(movement) {

let worldPosition = viewer.scene.pickPosition(movement.position);

let cartographic = NF.Cartographic.fromCartesian(worldPosition);

let 相机视角信息 = {

destination: {

x: viewer.camera.position.x,

y: viewer.camera.position.y,

z: viewer.camera.position.z

},

orientation: {

heading: viewer.camera.heading,

pitch: viewer.camera.pitch,

roll: viewer.camera.roll

}

}

console.log('相机视角信息', 相机视角信息);

}, NF.ScreenSpaceEventType.LEFT_CLICK);

 

你可能感兴趣的:(Cesiumjs)