cesium貼地畫線


代碼為:

 polylineGeometry = viewer.entities.add({
                    name: "newPolygon",
                    polyline: {
                        positions: new CallbackProperty(e => {
                            return tempPoints;
                        }, false),
                        clampToGround: true,//貼地畫線
                        width: 5.0,
                        material: new PolylineGlowMaterialProperty(cesiumColor.GOLD),
                        depthFailMaterial: new PolylineGlowMaterialProperty(cesiumColor.GOLD),
                    }
                });

貼地划線的主要代碼為:clampToGround: true,//貼地畫線,加上后就可以進行線貼地了。

效果如下:

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM