1、阴影效果
viewer.shadows = true;
2、取消左键双击事件
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
3、定位飞到某处
viewer.scene.camera.flyTo({ destination: rectangle });
4、开启灯光
scene.globe.enableLighting = true;
5、限制缩放距离
scene.screenSpaceCameraController.minimumZoomDistance = 100;
6、解决Cesium绘制几何图形被高程遮挡问题
viewer.scene.globe.depthTestAgainstTerrain = true;
7、point贴地
var point = viewer.entities.add({
position: worldPosition,
point: {
pixelSize: 10,
color: Cesium.Color.YELLOW,
//控制是否贴地
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND
},
});
8、地球移动事件
[code]
camera.moveStart.addEventListener(function() {
});
camera.moveEnd.addEventListener(function() {
});