CESIUM 获取当前视图范围
点击跳转至原文
侵删
getPickRay方法
官方解释是:
Create a ray from the camera position through the pixel at windowPosition in world coordinates.
大体意思是:能够通过屏幕坐标转换成经纬度坐标。屏幕坐标的话,我们可以通过div位置来获取,这样屏幕的左上角坐标和右下角坐标是可以很容易获取到的。
以下是获取左上角和右下角的详细代码:
let pt1 = new Cesium.Cartesian2(0,0);
let pt2