首页 / 浏览问题 / 桌面GIS / 问题详情
vue调用 Cesium.when 报错
72EXP 2021年11月30日

调用报错为什么? TypeError: Cesium.when is not a function

 screenshotClick() {

      console.log('截图')

      var scene = window.viewer.scene;

      var promise = scene.outputSceneToFile();

      Cesium.when(promise, function (base64data) {

          this.download(base64data);

          console.log('base64');

      })

      console.log(viewer,'viewer');

      console.log(scene,'scene');

      console.log(Cesium,'cesium');

我调用实现屏幕截图功能; 

打印出来的log:

问题关闭原因: 不清楚

1个回答

你好,可以确认下当前页面是否能拿到Cesium
6,077EXP 2021年11月30日

有值,Cesium有数据;

我log都打印出来了,都有值呀,没有空的呀
...