您好可以创建临时图层的方式来控制某些图层不显示,下面是是一个简单例子可供 参考
var layerStatus = new SuperMap.LayerStatus({
layerName:"continent_T@World",
isVisible:false,
});
var layerStatusParameters=new SuperMap.SetLayerStatusParameters({
layerStatusList:[layerStatus]
});
new ol.supermap.LayerInfoService(url).setLayerStatus(layerStatusParameters,(e)=>{
var tempLayerID = e.result.newResourceID;
console.log(tempLayerID)
var layer = new ol.layer.Tile({
source: new ol.source.TileSuperMapRest({
url: url,
cacheEnabled:false,
layersID:tempLayerID
}),
projection: 'EPSG:4326'
});
map.addLayer(layer);
});