首页 / 浏览问题 / 三维GIS / 问题详情
可视域和绘制得线条有冲突,会导致地图直接卡死,原因未知
249EXP 2025年12月03日

我是直接自己在官网复现测试过得,感觉这个bug有点严重直接会导致卡死有点可怕,完整得步骤过程见注释。
https://www.supermapol.com/webgl/examples/webgl/editor.html#viewshed3D
 

   <button type="button" id="clearLine" class="button black">清除线条</button>

 
  //1.绘制线条(代码运行添加)
        //2.绘制可视域(绘制可视域需要压盖线条)
        //3.点击清除线条
        //4.点击清除可视域出现卡死
let lineEntity =viewer.entities.add({
            polyline: {
                positions: SuperMap3D.Cartesian3.fromDegreesArray([116.44768006375261,39.90695837418782,116.44768006375261,39.10695837418782]),
                width: 5, // 线条宽度
                material: new SuperMap3D.PolylineOutlineMaterialProperty({
                    color: SuperMap3D.Color.fromCssColorString('rgba(250, 196, 65, 1)'),
                    outlineColor: SuperMap3D.Color.fromCssColorString('rgba(29, 206, 200, 1)'),
                    outlineWidth: 3, // 边框宽度
                }),
                clampToGround:true,//设置线条贴地
            }
        });
        
         $("#clearLine").on("click", function () {
           viewer.entities.remove(lineEntity)
        })

1个回答

您好,

目前该问题已于12.0.1最新双周版本修复,请查看私信下载对应版本包。

希望能够帮助到您。
1,435EXP 2025年12月03日
好的,谢谢
...