首页 / 浏览问题 / Web / 问题详情
movingTargetLayer中用visiblity不生效
桥洪  (31分)  初出茅庐
7月16日, 2021
if(item.checked == false && item.nodeName == "标绘图层"){
          this.map2D.movingTarget = L.supermap.plotting.movingTargetLayer("标绘图层", EsMapURL.SuperMapService.plotUrl,{"visibility": true});
          this.map2D.movingTarget.addTo(this.map2D);
        } else if(item.checked == true && item.nodeName == "标绘图层"){
          this.map2D.movingTarget = L.supermap.plotting.movingTargetLayer("标绘图层", EsMapURL.SuperMapService.plotUrl,{"visibility": false});
          this.map2D.movingTarget.addTo(this.map2D);
        }

1个回答

您好,单独设置设标绘图层的显隐建议通过接口来设置setVisibility();

 var plottingLayer = L.supermap.plotting.movingTargetLayer("plot", serverUrl);

plottingLayer.setVisibility(false)
johnJJ  (845分)  才高八斗
7月19日, 2021
...