cesium怎么监听地图的缩放还有拖动啊6年前/ 鼠标滚轮事件
var camera=viewer.camera;
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(wheelment) {
var height=camera.positionCartographic.height;
if(height<100000){
viewer.camera.setView({
destination : Cesium.Cartesian3.fromRadians(viewer.camera.positionCartographic.longitude, viewer.camera.positionCartographic.latitude, 100000)
});
};
if(height>10000000){
viewer.camera.setView({
destination : Cesium.Cartesian3.fromRadians(viewer.camera.positionCartographic.longitude, viewer.camera.positionCartographic.latitude, 10000000)
});
}
}, Cesium.ScreenSpaceEventType.WHEEL);