handler.setInputAction(function (event) {
//1.橢球面坐標:獲取當前點擊視線與橢球面相交處的坐標,在加載地形的場景上獲取的坐標有誤差
//var earthPosition = viewer.camera.pickEllipsoid(event.position,viewer.scene.globe.ellipsoid);
//2.場景坐標:獲取場景中任意點擊處的對應的世界坐標,需要開啟“地形深度檢測”(在未開啟“地形深度檢測”的情況下只能在3DTile上准確獲取空間坐標,開啟“地形深度檢測”后,viewer.scene.pickPosition 也能在非3DTile上准確獲取坐標)
viewer.scene.globe.depthTestAgainstTerrain = true;
var earthPosition = viewer.scene.pickPosition(event.position);
//3.地標坐標:獲取點擊處地球表面的世界坐標,不包括模型、傾斜攝影表面
// var ray = viewer.camera.getPickRay(event.position);
// var earthPosition = viewer.scene.globe.pick(ray, viewer.scene);
if (Cesium.defined(earthPosition)) {
}
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);