}
} else {
if(wms.getLayerGroupByName(layerName) != null) {
LayerGroupInfo group = wms.getLayerGroupByName(layerName);
for(int i = 0; i < group.getLayers().size(); i++) {
LayerInfo layer = group.getLayers().get(i);
layers.add(new MapLayerInfo(layer));
StyleInfo style = group.getStyles().get(i);
if(style != null) {
styles.add(style.getStyle());
} else {
styles.add(layer.getDefaultStyle().getStyle());
}
}
// move to the next named layer
continue;
} else {
LayerInfo layerInfo = wms.getLayerByName(layerName);
if(layerInfo == null)
throw new WmsException("Unknown layer: " + layerName);
currLayer = new MapLayerInfo(layerInfo);