comparison 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
comparison
equal deleted inserted replaced
43:ef7ca23c4233 44:9b5fb5e5914d
206 //each class. 206 //each class.
207 for(int i = 0; i < list.getLength(); i++) { 207 for(int i = 0; i < list.getLength(); i++) {
208 Element classElement = (Element)list.item(i); 208 Element classElement = (Element)list.item(i);
209 classObj co = new classObj(layer); 209 classObj co = new classObj(layer);
210 co.setName(classElement.getAttribute("name")); 210 co.setName(classElement.getAttribute("name"));
211 if(classElement.hasAttribute("field_count")) {
212 int count =
213 Integer.parseInt(classElement.getAttribute("field_count"));
214 String exp = "";
215 for(int j = 0; j < count; j++) {
216 //TODO Find a way to create Expressions.
217 exp = "([" + classElement.getAttribute("expression_field_" + j);
218 exp += "] = " + classElement.getAttribute("value") + ")";
219 }
220 co.setExpression(exp);
221 }
211 //Write symbols and styles. 222 //Write symbols and styles.
212 writeSymbol(co, classElement); 223 writeSymbol(co, classElement);
213 } 224 }
214 } 225 }
215 226
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)