Cesium将经纬度转为屏幕坐标系并判断是否在当前视角可见

//1.计算屏幕坐标
let position = Cesium.Cartesiian3.fromDegrees(jd, wd, 0);
let chanedc = Cesium.SceneTransforms.wgs84ToWindowCoordinates(viewer.scene, position);
if(chanedc == undefined) return;

//2.判断当前视角是否可见
let cameraOccluder = new Cesium.EllipsoidalOccluder(Cesium.Ellipsoid.WGS84, viewer.camera.position);
let viewerVisible = cameraOccluder.isPointVisible(position);

    原文作者:A 壹零贰肆
    原文地址: https://blog.csdn.net/a873744779/article/details/119986080
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞