changeset 107:196abb30c0d2

another merge with raimund
author Stephan Holl <stephan.holl@intevation.de>
date Tue, 07 Jun 2011 15:52:45 +0200
parents 609c234e8e23 (current diff) d6d2a4058ebf (diff)
children 3c58c07cee6b
files ChangeLog
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jun 07 15:50:43 2011 +0200
+++ b/ChangeLog	Tue Jun 07 15:52:45 2011 +0200
@@ -1,5 +1,9 @@
+2011-06-07  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Set the class name to the layer name if it is empty.
+
 2011-06-01  Stephan Holl  <stephan.holl@intevation.de>
-
 	*  mapserver/symbols/symbols.sym: added a default hatch-symbol
 
 2011-06-01  Stephan Holl  <stephan.holl@intevation.de>
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Tue Jun 07 15:50:43 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Tue Jun 07 15:52:45 2011 +0200
@@ -209,7 +209,14 @@
         for(int i = 0; i < list.getLength(); i++) {
             Element classElement = (Element)list.item(i);
             classObj co = new classObj(layer);
-            co.setName(classElement.getAttribute("name"));
+            String name = classElement.getAttribute("name");
+            if (name.equals("")) {
+                name = layerElement.getAttribute("name");
+                if (list.getLength() > 1) {
+                    name += "-" + i;
+                }
+            }
+            co.setName (name);
             if(classElement.hasAttribute("field_count")) {
                 int count =
                     Integer.parseInt(classElement.getAttribute("field_count"));
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)