Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java @ 4473:6db783627137
Map print does now submit additional parameters to MapPrintServiceImpl.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Sat, 10 Nov 2012 23:47:38 +0100 |
parents | dc7e41efd5ba |
children | bd78d2b0e309 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java Sat Nov 10 00:53:28 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java Sat Nov 10 23:47:38 2012 +0100 @@ -19,6 +19,7 @@ import java.net.URLEncoder; import java.util.ArrayList; import java.util.Collections; +import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -122,7 +123,8 @@ Document descDocument, MapConfig mapConfig, Double minX, Double minY, - Double maxX, Double maxY + Double maxX, Double maxY, + Map<String, Object> settings ) { Map<String, Object> spec = new LinkedHashMap<String, Object>(); spec.put("layout", "A4 portrait"); @@ -184,6 +186,9 @@ page.put("comment", "Eine mit FLYS gedruckte Karte."); page.put("rotation", Integer.valueOf(0)); + // This may overwrite default settings above + page.putAll(settings); + pages.add(page); spec.put("pages", pages); @@ -250,6 +255,11 @@ mapType = "map"; } + // Retrieve print settings from request + Map<String, Object> settings = new HashMap<String, Object>(); + String pageTitle = req.getParameter("page-title"); + settings.put("mapTitle", pageTitle); + String url = getURL(); Document requestOut = @@ -314,7 +324,8 @@ descDocument, mapConfig, minX, minY, - maxX, maxY); + maxX, maxY, + settings); if (log.isDebugEnabled()) { log.debug("Generated spec:");