首页 / 浏览问题 / 三维GIS / 问题详情
webgl-vue版本几何线和几何点均不能贴S3m模型
7EXP 2022年04月09日

vue版本【  "@supermap/vue-iclient3d-webgl": "1.0.9",】中几何线和几何点均不能贴模型(s3m),几何面可以贴(s3m)

代码如下:

_this.viewer.entities.add({

          polyline: {

              positions:[

                Cesium.Cartesian3.fromDegrees(regionpoints[0].Longitude,regionpoints[0].Latitude,regionpoints[0].Altitude),

                Cesium.Cartesian3.fromDegrees(regionpoints[1].Longitude,regionpoints[1].Latitude,regionpoints[1].Altitude),

                Cesium.Cartesian3.fromDegrees(regionpoints[2].Longitude,regionpoints[2].Latitude,regionpoints[2].Altitude)

              ],//位置

              material: new Cesium.Color(1,1,0,1),

              width: 20,  

          },  

          clampToS3M:true,  

          classificationType: Cesium.ClassificationType.S3M_TILE

      });

1个回答

您好, 我这边测试没有问题的

线贴对象的话,仅clampToGround: true,或同时clampToGround: true,classificationType: Cesium.ClassificationType.S3M_TILE,

都是可以贴地的。
测试代码: viewer.entities.add({
                polyline: {
                    positions: Cesium.Cartesian3.fromDegreesArray([
                        116.461639144018,39.9035120538519,0,
                        116.462039298819,39.9041561817745,0
]),
                    width: 10,
                    clampToGround: true,
                    //classificationType: Cesium.ClassificationType.S3M_TILE,
}
});

点的话不用贴对象,建议您直接构造三维点,给您想要的高度就行。

希望可以这边帮助到您。
9,538EXP 2022年04月11日
...