diff src/java/de/intevation/mxd/reader/SimpleRendererReader.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/reader/SimpleRendererReader.java	Fri Apr 15 15:44:54 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/SimpleRendererReader.java	Mon Apr 18 14:50:49 2011 +0200
@@ -77,16 +77,10 @@
         Element rendererElement;
         try {
             rendererElement = util.addRenderer(layer);
-        }
-        catch(Exception e) {
-            e.printStackTrace();
-            return null;
-        }
 
-        rendererElement.setAttribute("label", renderer.getLabel());
-        rendererElement.setAttribute("description", renderer.getDescription());
-        symbol = renderer.getSymbol();
-        try {
+            rendererElement.setAttribute("label", renderer.getLabel());
+            rendererElement.setAttribute("description", renderer.getDescription());
+            symbol = renderer.getSymbol();
             if(symbol instanceof SimpleMarkerSymbol){
                 ISymbolReader isr= new SimpleMarkerSymbolReader(symbol);
                 isr.setParent(rendererElement);
@@ -99,12 +93,12 @@
                 isr.setUtil(util);
                 isr.read();
             }
-            return rendererElement;
+            return layer;
         }
         catch(Exception e) {
             e.printStackTrace();
+            return null;
         }
-        return rendererElement;
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)