在新做的cesium加载等值面功能中,地形上加载贴地面出现挤压现象,先记录解决办法


解决办法很简单,给 zIndex赋值,
res.entities.values.forEach((fea, index) => {
const entity = new Cesium.Entity({
id: fea.id,
polygon: new Cesium.PolygonGraphics({
hierarchy: fea.polygon.hierarchy,
//height: 1500,
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
//extrudedHeight: fea.properties.hvalue * 20,
// extrudedHeightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
// classificationType: Cesium.ClassificationType.TERRAIN,
material: this.getLevelColor(fea.properties),
arcType: Cesium.ArcType.RHUMB,
zIndex: index,
//perPositionHeight: true,
}),
});
this.dataSource.entities.add(entity);
});
网友评论