首页 / 浏览问题 / WebGIS / 问题详情
movingTargetLayer中用visiblity不生效
31EXP 2021年07月16日
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)
865EXP 2021年07月19日
...