| | |
| | | // 获取鼠标事件 |
| | | var handler = new Cesium.ScreenSpaceEventHandler(this.map.scene.canvas); |
| | | // 给鼠标左键添加事件函数 |
| | | handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | //handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | handler.setInputAction(lang.hitch(this, this.clickHandLayer), Cesium.ScreenSpaceEventType.LEFT_DOWN); |
| | | }, |
| | | |
| | | // 注册鼠标左键单击事件 |
| | | clickHandLayer: function (movement) { |
| | | $("#nav_box").stop().hide(); |
| | | $("#nav_box").find("li").remove(); |
| | | var self = this; |
| | | var pickRay = this.map.camera.getPickRay(movement.position); |
| | | var featuresPromise = this.map.imageryLayers.pickImageryLayerFeatures(pickRay, this.map.scene); |