changeset 2515:532c590beb3e

Fixed problem with selecting the wrong map scale for printing. flys-client/trunk@4380 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 10 May 2012 09:49:08 +0000
parents 902526c9efd4
children 5d62aa5a57e3
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java flys-client/src/main/webapp/WEB-INF/config.yaml
diffstat 3 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed May 09 22:01:50 2012 +0000
+++ b/flys-client/ChangeLog	Thu May 10 09:49:08 2012 +0000
@@ -1,3 +1,11 @@
+2012-05-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java:
+	  Fixed problem with selecting the wrong map scale for printing.
+
+	* src/main/webapp/WEB-INF/config.yaml: Added scales 1:2500, 1:5000, 1:10000
+	  and 1:15000 for "close-ups".
+
 2012-05-09	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java	Wed May 09 22:01:50 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java	Thu May 10 09:49:08 2012 +0000
@@ -234,7 +234,8 @@
         Double maxY = null;
 
         if (minXS != null && maxXS != null
-        &&  minYS != null && maxYS == null) {
+        &&  minYS != null && maxYS != null) {
+            log.debug("all parameters found -> parsing");
             try {
                 minX = Double.parseDouble(minXS);
                 minY = Double.parseDouble(minYS);
@@ -289,6 +290,7 @@
         MapConfig mapConfig = MapHelper.parseConfig(outDocument);
 
         if (minX == null) {
+            log.debug("parameters missing -> fallback to max extent");
             String [] parts = mapConfig.getMaxExtent().split("\\s+");
             if (parts.length < 4) {
                 throw new ServletException(
--- a/flys-client/src/main/webapp/WEB-INF/config.yaml	Wed May 09 22:01:50 2012 +0000
+++ b/flys-client/src/main/webapp/WEB-INF/config.yaml	Thu May 10 09:49:08 2012 +0000
@@ -12,6 +12,10 @@
 # the allowed scales
 #===========================================================================
 scales:
+  - 2500
+  - 5000
+  - 10000
+  - 15000
   - 25000
   - 50000
   - 100000

http://dive4elements.wald.intevation.org