首页 / 浏览问题 / WebGIS / 问题详情
倾斜摄影发布到iServer上,代码引入后如何给倾斜摄影添加一层覆盖颜色
13EXP 2023年08月01日
倾斜摄影发布到iServer上,代码引入后如何给倾斜摄影添加一层覆盖颜色

const _this = this;

      const widget = this.view.cesiumWidget;

      try {

        // 加载倾斜摄影

        this.promise = this.view.scene.open(this.iserver + '/services/3D-JiuLianShan/rest/realspace');

        Cesium.when(this.promise, function (layers) {

          layers[0].visible = false;

          // 设置相机位置、方向,定位至模型

          scene.camera.setView({

            destination: new Cesium.Cartesian3.fromDegrees(126.021012, 44.966246, 200),

            orientation: {

              pitch: Cesium.Math.toRadians(-5),  // 俯仰角

            }

          });

        }, function (e) {

          if (widget._showRenderLoopErrors) {

            widget.showErrorPanel('加载模型失败,请检查网络连接状态?', undefined, e);

          }

        });

      } catch (e) {

        if (widget._showRenderLoopErrors) {

          widget.showErrorPanel('倾斜摄影渲染时发生错误,已停止渲染!', undefined, e);

        }

      }

1个回答

您好,有两种实现的思路,

1.在场景中添加颜色为半透明实体面对象(数据来源可以是文件、数据服务、代码构造均可),设置高度模式为贴对象

2.对缓存图层设置分层设色

建议使用第一种方案,可以参考:

http://support.supermap.com.cn:8090/webgl/examples/webgl/editor.html#Polygon

希望可以帮助到您。

9,653EXP 2023年08月01日
...