【发布时间】:2017-12-13 22:32:49
【问题描述】:
我正在尝试使用材质属性设置多边形的颜色,如下所示:
drawOnMap() {
let material = Cesium.Material.fromType('Color');
material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);
const entityObject = {
polygon: {
hierarchy: this.positions !== undefined ? this.positions : undefined,
height: 0,
material: material,
}
};
return this.cesiumEntity = this.cesiumViewerService.getViewer().entities.add( entityObject );
}
我尝试了各种组合来创建材质,但它们都被忽略了,多边形被渲染为白色。我错过了什么?
请注意,如果我使用Cesium.Color.RED,多边形会按预期呈现为红色。
帮助不胜感激!
【问题讨论】: