我的github
posts - 3243,  comments - 42,  views - 158万

一、

2、取消左键双击事件

viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);

参考1:https://blog.csdn.net/weixin_40184249/article/details/91404371

二、

removeEventHandler

// 别名,但不建议使用。
this.addEventListener = this.on;
this.removeEventListener = this.clearAllEventListeners = this.off;

 

cesium removeeventlistener函数

cesium绑定鼠标事件,及清除事件(采坑清除事件不起作用,解决方案):https://blog.csdn.net/weixin_44058725/article/details/105856045

事件:

Cesium.ScreenSpaceEventType.MOUSE_MOVE:鼠标移动
Cesium.ScreenSpaceEventType.LEFT_CLICK:鼠标左键点击
Cesium.ScreenSpaceEventType.WHEEL:滚轮缩放
 
>>>清除实体
Cesium知识点(一):实体对象的添加、获取、删除:https://www.codeleading.com/article/66461176977/
Cesium区分单击【LEFT_CLICK】和双击事件【LEFT_DOUBLE_CLICK】:https://www.cnblogs.com/aizai846/p/11315891.html   https://blog.csdn.net/qq_18144905/article/details/82178132
 
监听滚轮
   //设置鼠标滚动事件的处理函数,这里负责监听高度值变化
    this.handler.setInputAction(function(wheelment) {
        height = Math.ceil(viewer.camera.positionCartographic.height);
        entity.position = cartesian;
        entity.label.show = true;
        entity.label.text = '(' + longitudeString + ', ' + latitudeString + "," + height + ')' ;
        entity.label.fillColor = Cesium.Color.BLACK;
    }, Cesium.ScreenSpaceEventType.WHEEL);
posted on   XiaoNiuFeiTian  阅读(2354)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2020-11-20 Openstreetmap 3d模型下载
2020-11-20 ArcHydro:水资源建模
2017-11-20 服务器搭建
2017-11-20 PS插件开发plugin
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示