美文网首页
2021-10-09 cesium加载面时出现面压住面情况解决

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

作者: MrSwilder | 来源:发表于2022-02-10 16:30 被阅读0次

    在新做的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);
                            });
    

    相关文章

      网友评论

          本文标题:2021-10-09 cesium加载面时出现面压住面情况解决

          本文链接:https://www.haomeiwen.com/subject/srvqoltx.html