首页 / 浏览问题 / 三维GIS / 问题详情
夜景时的道路
57EXP 2021年06月21日

夜景时的道路怎么实现如图的效果?

1个回答

6,077EXP 2021年06月21日

转换角度的时候为什么会出现这个白色的边框呢

 viewer.entities.add({

              name: "Red line on the surface",

              polyline: {

                positions: Cesium.Cartesian3.fromDegreesArray([

                  120.08538154621917,

                  33.290004750707126,

                  120.05518231394171,

                  33.364749140367536

                ]),

                width: 10,

                depthFailMaterial: new Cesium.PolylineOutlineMaterialProperty({

                  color: new Cesium.Color(238, 2387, 0, 0.2)

                })

              }

            });

您好,您可以在polyline的属性里面加上material:new Cesium.PolylineOutlineMaterialProperty({
                    color: Cesium.Color.RED,
                }),

因为depthFailMaterial的作用是 指定在深度测试失败时用于绘制多段线的材料 ,需要 EXT_frag_depth WebGL 扩展

...