首页 / 浏览问题 / WebGIS / 问题详情
viewer.pickEvent.addEventListener();不起作用
82EXP 2021年12月21日
viewer.pickEvent.addEventListener(function (feature) {
                alert("pickEvent事件已生效");
            });

未起作用

1个回答

您好,这个事件是要配合layer.setQueryParameter一起使用才会生效的。可以参考下这个demo:http://localhost:8090/iserver/iClient/for3D/webgl/zh/examples/webgl/editor.html#S3MTiles

1,504EXP 2021年12月21日
请问,这个事件反应大约在2秒,才执行,慢了一拍。

viewer.pickEvent.addEventListener(function (feature) {
                var title = Cesium.defaultValue(feature.MODELNAME, '');
                $("#title").text(title);
            });
network中看下上面ajax的请求返回时间时多少,看是返回慢还是其他地方慢呢?
...