diff src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 44:9b5fb5e5914d

Added expressions for mapserver classes.
author Raimund Renkert <rrenkert@intevation.de>
date Mon, 18 Apr 2011 14:50:49 +0200
parents ef7ca23c4233
children 34a93dad7604
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Fri Apr 15 15:44:54 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Mon Apr 18 14:50:49 2011 +0200
@@ -208,6 +208,17 @@
             Element classElement = (Element)list.item(i);
             classObj co = new classObj(layer);
             co.setName(classElement.getAttribute("name"));
+            if(classElement.hasAttribute("field_count")) {
+                int count =
+                    Integer.parseInt(classElement.getAttribute("field_count"));
+                String exp = "";
+                for(int j = 0; j < count; j++) {
+                    //TODO Find a way to create Expressions.
+                    exp = "([" + classElement.getAttribute("expression_field_" + j);
+                    exp += "] = " + classElement.getAttribute("value") + ")";
+                }
+                co.setExpression(exp);
+            }
             //Write symbols and styles.
             writeSymbol(co, classElement);
         }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)