diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java @ 1144:c07e9e9c7482

Set the river extent for WMSLayers in the FloodMapState. flys-artifacts/trunk@2667 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 07 Sep 2011 13:54:18 +0000
parents bcf70a452646
children 64b465699a24
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Wed Sep 07 11:50:10 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Wed Sep 07 13:54:18 2011 +0000
@@ -124,11 +124,13 @@
             hash,
             url);
 
-        String srid = FLYSUtils.getRiverSrid(artifact);
+        String srid  = FLYSUtils.getRiverSrid(artifact);
+        String river = artifact.getDataAsString("river");
 
         wsplgen.addLayer(
             artifact.identifier() + MapfileGenerator.MS_WSPLGEN_POSTFIX);
         wsplgen.setSrid(srid);
+        wsplgen.setExtent(GeometryUtils.getRiverBounds(river));
 
         WMSLayerFacet barriers = new WMSLayerFacet(
             1,
@@ -142,6 +144,7 @@
         barriers.addLayer(
             artifact.identifier() + MapfileGenerator.MS_BARRIERS_POSTFIX);
         barriers.setSrid(srid);
+        barriers.setExtent(GeometryUtils.getRiverBounds(river));
 
         facets.add(wsplgen);
         facets.add(barriers);

http://dive4elements.wald.intevation.org