倾斜摄影发布到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);
}
}