});
version = client.getVersion();
for (final String s : client.getLayerNames()) {
WMSLayer layer = client.getLayer(s);
// this.service =
// client.getServiceName();
final Vector allSrs = layer.getAllSrs();
boolean epsg = (allSrs != null) ? allSrs
.contains("EPSG:4326") : false;
final Vector formats = client.getFormats();
if (formats.contains("image/png")) {
png = "image/png";
} else if (formats.contains("IMAGE/PNG")) {
png = "IMAGE/PNG";
} else if (formats.contains("png")) {
png = "png";
} else if (formats.contains("PNG")) {
png = "PNG";
}
boolean image = png != null;
if (png == null) {
png = "IMAGE/PNG";
}
if (epsg && image) {
boolean hasTransparency = layer
.hasTransparency();
this.transparentes.put(s,
hasTransparency);
Capa capa = new Capa();
capa.setCapaInformacion(ci);
if (layer.getStyles().size() > 0) {
capa.setEstilo(((WMSStyle) layer
.getStyles().get(0))
.getName());
}
capa.setNombre(layer.getTitle());
capa.setTitulo(s);
res.add(capa);
if (!hasTransparency) {
errorStack
.add(i18n
.getString(
Locale.ROOT,
"admin.capas.nueva.error.capaNoTransparente",
layer.getTitle()));
}
} else {
String error = "";
// if (opaque)
// error += "<li>Es opaca</li>";