Mercurial > mxd2map
changeset 304:50031b1ae8e6
No longer ignore Layers without classes
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 05 Sep 2012 17:18:18 +0200 |
parents | a9684178cb29 |
children | ebf974199309 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 7 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Sep 05 17:16:41 2012 +0200 +++ b/ChangeLog Wed Sep 05 17:18:18 2012 +0200 @@ -1,3 +1,9 @@ +2012-09-05 Andre Heinecke <aheinecke@intevation.de> + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + No longer ignore Layers without classes. This is completly + legal in Map Files. + 2012-09-05 Andre Heinecke <aheinecke@intevation.de> * src/java/de/intevation/mxd/reader/RasterLayerReader.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Sep 05 17:16:41 2012 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Wed Sep 05 17:18:18 2012 +0200 @@ -261,14 +261,6 @@ Element layerElement = (Element)list.item(i); layerObj layer = new layerObj(map); NodeList renderer = layerElement.getElementsByTagName("renderer"); - if (renderer.getLength() == 0 && - layerElement.getAttribute("connection_type") != "WMS") { - map.removeLayer(layer.getIndex()); - logger.warn( - "Skipping empty layer " + - layerElement.getAttribute("name")); - continue; - } //The layer name. String group = ""; @@ -398,7 +390,7 @@ //The layer datasource. String con_type = layerElement.getAttribute("connection_type"); if(con_type.equals("local")) { - // The data source is a local file. (.shp) + // The data source is a local file. (.shp or Image) String datasource = ""; if(layerElement.hasAttribute("workspace")) { datasource = layerElement.getAttribute("workspace");