首页 / 浏览问题 / WebGIS / 问题详情
超图FAQ:【iClient】Ceisum的DrawHadler绘制多边形的时候如何让他显示轮廓线呢
64,468EXP 2023年12月26日
【iClient】Ceisum的DrawHadler绘制多边形的时候如何让他显示轮廓线呢

1个回答

【问题原因】polygonEntity需要设置outline=true,才能显示轮廓 【解决办法】安装如下代码设置polygonEntity样式: var handler = new Cesium.DrawHandler(viewer,Cesium.DrawMode.Polygon); handler.drawEvt.addEventListener(function(res){ viewer.entities.removeById(handler.polyline.id); var polygonEntity = res.object.polygon; polygonEntity.outline=true; polygonEntity.outlineColor = new Cesium.Color(1, 1, 0, 1); polygonEntity.outlineWidth =1; polygonEntity.material.color = new Cesium.Color(1, 0, 0, 0.6); }); handler.activate();
64,468EXP 2023年12月26日
热门文章
关注我们
...