2021-10-09 cesium加载面时出现面压住面情况解决

2022-02-10  本文已影响0人  MrSwilder

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


image.png
image.png

解决办法很简单,给 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);
                        });
上一篇下一篇

猜你喜欢

热点阅读