Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java @ 1710:055f32a5388a
Improved the mapfile templates to create nicer GetLegendGraphic images.
flys-artifacts/trunk@2970 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 14 Oct 2011 11:13:04 +0000 |
parents | 6c0b79efd2c9 |
children | 0156105222c9 |
comparison
equal
deleted
inserted
replaced
1709:f643ea084213 | 1710:055f32a5388a |
---|---|
14 import org.apache.log4j.Logger; | 14 import org.apache.log4j.Logger; |
15 | 15 |
16 import org.apache.velocity.Template; | 16 import org.apache.velocity.Template; |
17 import org.apache.velocity.VelocityContext; | 17 import org.apache.velocity.VelocityContext; |
18 import org.apache.velocity.app.VelocityEngine; | 18 import org.apache.velocity.app.VelocityEngine; |
19 | |
20 import de.intevation.artifacts.common.utils.Config; | |
19 | 21 |
20 import de.intevation.flys.artifacts.model.LayerInfo; | 22 import de.intevation.flys.artifacts.model.LayerInfo; |
21 | 23 |
22 /** | 24 /** |
23 * This class iterates over a bunch of directories, searches for meta | 25 * This class iterates over a bunch of directories, searches for meta |
393 VelocityContext context = new VelocityContext(); | 395 VelocityContext context = new VelocityContext(); |
394 context.put("MAPSERVERURL", | 396 context.put("MAPSERVERURL", |
395 FLYSUtils.getXPathString(FLYSUtils.XPATH_MAPSERVER_URL)); | 397 FLYSUtils.getXPathString(FLYSUtils.XPATH_MAPSERVER_URL)); |
396 context.put("SHAPEFILEPATH", | 398 context.put("SHAPEFILEPATH", |
397 getShapefileBaseDir().getCanonicalPath()); | 399 getShapefileBaseDir().getCanonicalPath()); |
400 context.put("CONFIGDIR", | |
401 Config.getConfigDirectory().getCanonicalPath()); | |
398 context.put("LAYERS", fillLayerTemplates(layers)); | 402 context.put("LAYERS", fillLayerTemplates(layers)); |
399 | 403 |
400 Template mapTemplate = getMapfileTemplate(); | 404 Template mapTemplate = getMapfileTemplate(); |
401 if (mapTemplate == null) { | 405 if (mapTemplate == null) { |
402 logger.warn("No mapfile template found."); | 406 logger.warn("No mapfile template found."); |