- 移动事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.MOUSE_MOVE)
- 左键单击事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.LEFT_CLICK)
- 左键按下事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.LEFT_DOWN)
- 左键抬起事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.LEFT_UP)
- 滑轮事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.WHEEL)
- 滑轮点击事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.MIDDLE_CLICK)
- 滑轮按下事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.MIDDLE_DOWN)
- 滑轮抬起事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.MIDDLE_UP)
- 右键单击事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
_this.handler.removeInputAction(_this.Cesium.ScreenSpaceEventType.方法名)
如:
_this.handler.removeInputAction(_this.Cesium.ScreenSpaceEventType.LEFT_CLICK)
_this.handler.removeInputAction(_this.Cesium.ScreenSpaceEventType.MOUSE_MOVE)
}, _this.Cesium.ScreenSpaceEventType.RIGHT_CLICK)
- 右键按下事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.RIGHT_DOWN)
- 右键抬起事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.RIGHT_UP)
- 左键双击事件
_this.handler.setInputAction(function (movement) {
console.log(movement)
}, _this.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK)
来源