changeset 190:c640fb351f66

Do not write layer with empty CLASS objects.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 16:00:22 +0200
parents 0965f8af70fa
children 17b4aaa159ec
files ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 20 15:55:43 2011 +0200
+++ b/ChangeLog	Wed Jul 20 16:00:22 2011 +0200
@@ -1,3 +1,8 @@
+2011-07-20  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Do not write layer with empty CLASS objects.
+
 2011-07-20  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Jul 20 15:55:43 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Jul 20 16:00:22 2011 +0200
@@ -190,6 +190,10 @@
         for(int i = 0; i < list.getLength(); i++) {
             Element layerElement = (Element)list.item(i);
             layerObj layer = new layerObj(map);
+            NodeList renderer = layerElement.getElementsByTagName("renderer");
+	    if (renderer.getLength() == 0) {
+	        continue;
+	    }
 
             //The layer name.
             String lname = layerElement.getAttribute("name");
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)