movingTargetLayer中用visiblity不生效

0 投票
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);
        }
7月 16 分类:  37次浏览 | 用户: 桥洪 初出茅庐 (27 分)

1个回答

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

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

plottingLayer.setVisibility(false)
7月 19 用户: johnJJ 才高八斗 (842 分)
...