获取当前视角的高度
this.viewer.scene.globe.ellipsoid.cartesianToCartographic(this.camera.position).height;
去掉 entity 的双击事件
viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
开启抗锯齿
viewer.scene.postProcessStages.fxaa.enabled = true;
/**
* 获取当前地图的级别
* @returns {*} 返回当前底图的级别
*/
getLevel(){
const level = this.viewer.scene.globe._surface._tilesToRender.length?this.viewer.scene.globe._surface._tilesToRender[0].level:this._getLevel();
return level;
}
_getLevel(height) {
//this.viewer.camera.positionCartographic获取摄像机的地图位置,经度和纬度以弧度表示,高度以米表示
height = Cesium.defaultValue(height,this.viewer.camera.positionCartographic.height);
let A = 40487.57;
let