Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java @ 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 | 4861ab2c28d2 |
children | 427df4e81af0 |
comparison
equal
deleted
inserted
replaced
2514:902526c9efd4 | 2515:532c590beb3e |
---|---|
232 Double maxX = null; | 232 Double maxX = null; |
233 Double minY = null; | 233 Double minY = null; |
234 Double maxY = null; | 234 Double maxY = null; |
235 | 235 |
236 if (minXS != null && maxXS != null | 236 if (minXS != null && maxXS != null |
237 && minYS != null && maxYS == null) { | 237 && minYS != null && maxYS != null) { |
238 log.debug("all parameters found -> parsing"); | |
238 try { | 239 try { |
239 minX = Double.parseDouble(minXS); | 240 minX = Double.parseDouble(minXS); |
240 minY = Double.parseDouble(minYS); | 241 minY = Double.parseDouble(minYS); |
241 maxX = Double.parseDouble(maxXS); | 242 maxX = Double.parseDouble(maxXS); |
242 maxY = Double.parseDouble(maxYS); | 243 maxY = Double.parseDouble(maxYS); |
287 } | 288 } |
288 | 289 |
289 MapConfig mapConfig = MapHelper.parseConfig(outDocument); | 290 MapConfig mapConfig = MapHelper.parseConfig(outDocument); |
290 | 291 |
291 if (minX == null) { | 292 if (minX == null) { |
293 log.debug("parameters missing -> fallback to max extent"); | |
292 String [] parts = mapConfig.getMaxExtent().split("\\s+"); | 294 String [] parts = mapConfig.getMaxExtent().split("\\s+"); |
293 if (parts.length < 4) { | 295 if (parts.length < 4) { |
294 throw new ServletException( | 296 throw new ServletException( |
295 "Max extent has less than 4 values"); | 297 "Max extent has less than 4 values"); |
296 } | 298 } |