diff flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java @ 2637:baaf7d125c43

Issue 560. Enabled GetFeatureInfo-request for WSPLGEN-layer. flys-artifacts/trunk@4264 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 18 Apr 2012 11:35:14 +0000
parents 27cc95e65f18
children ccad7a6ddaa4
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Wed Apr 18 09:28:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Wed Apr 18 11:35:14 2012 +0000
@@ -17,12 +17,14 @@
 import org.apache.velocity.VelocityContext;
 import org.apache.velocity.app.VelocityEngine;
 
+import de.intevation.artifacts.CallContext;
 import de.intevation.artifacts.common.utils.Config;
 
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.model.LayerInfo;
 import de.intevation.flys.artifacts.model.WMSLayerFacet;
 import de.intevation.flys.artifacts.model.WMSDBLayerFacet;
+import de.intevation.flys.artifacts.resources.Resources;
 
 /**
  * This class iterates over a bunch of directories, searches for meta
@@ -38,6 +40,7 @@
     public static final String WSPLGEN_LINES_SHAPE    = "barrier_lines.shp";
     public static final String WSPLGEN_POLYGONS_SHAPE = "barrier_polygons.shp";
 
+    public static final String WSPLGEN_LAYER_TEMPLATE = "wsplgen_layer.vm";
     public static final String SHP_LAYER_TEMPLATE = "shapefile_layer.vm";
     public static final String DB_LAYER_TEMPLATE  = "db_layer.vm";
 
@@ -367,7 +370,8 @@
     public void createUeskLayer(
         FLYSArtifact  flys,
         WMSLayerFacet wms,
-        String        style
+        String        style,
+        CallContext context
     ) throws FileNotFoundException, IOException
     {
         logger.debug("createUeskLayer");
@@ -377,14 +381,16 @@
         layerinfo.setType("POLYGON");
         layerinfo.setDirectory(flys.identifier());
         layerinfo.setData(WSPLGEN_RESULT_SHAPE);
-        layerinfo.setTitle("I18N_WSPLGEN_RESULT");
+        layerinfo.setTitle(Resources.getMsg(Resources.getLocale(context.getMeta()),
+                                            "floodmap.uesk",
+                                            "Floodmap"));
         layerinfo.setStyle(style);
 
         String name = MS_LAYER_PREFIX + wms.getName();
 
-        Template template = getTemplateByName(SHP_LAYER_TEMPLATE);
+        Template template = getTemplateByName(WSPLGEN_LAYER_TEMPLATE);
         if (template == null) {
-            logger.warn("Template '" + SHP_LAYER_TEMPLATE + "' found.");
+            logger.warn("Template '" + WSPLGEN_LAYER_TEMPLATE + "' found.");
             return;
         }
 

http://dive4elements.wald.intevation.org