使用产品: SuperMap iClient3D for Cesium 操作系统:win10 x64
数据类型 osgb
问题描述:图层已经正确添加,setQueryParameter参数也已经设定,数据服务一切正常。但是不能触发pickEvent事件
var scpPromise = window.Viewer.scene.open( "http://192.168.253.36:8090/iserver/services/3D-PaiShuiMoXing1012/rest/realspace", undefined, { autoSetView: false, //不自动定位 } ); Cesium.when(scpPromise, function(layers) { var c = ""; if(year < 100){ c = "T00"+ year }else{ c= "T0" + year } var layer = window.Viewer.scene.layers.find(c); //绑定图层,图层名称可在三维服务地址下的datas中看 layer.visible = true; console.log("layer",layer) layer.setQueryParameter({ url: "http://192.168.253.36:8090/iserver/services/data-PaiShuiYanMeiMoXingShuJu/rest/data", dataSourceName: "排水淹没模型数据", //对应数据源名称,数据服务 dataSetName: c, //对应数据集名称,数据服务 keyWord: "SmID", }); } ); window.Viewer.pickEvent.addEventListener(function (feature) { console.log("已生效") })
参数已经在超图mod中测试过,没有问题,但是pickEvent仍不生效