Mercurial > dive4elements > gnv-client
diff gnv/src/main/java/de/intevation/gnv/action/WMSAction.java @ 984:cfc7bd35ee0b
Set the map to the extent which was sent by the rest-server
gnv/trunk@1167 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Mon, 07 Jun 2010 14:52:45 +0000 |
parents | d1ed5c51c0de |
children | 33198e55371c |
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java Mon Jun 07 12:35:49 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java Mon Jun 07 14:52:45 2010 +0000 @@ -61,6 +61,9 @@ public static final String XPATH_TTL = "/art:meta/art:mapserver/art:ttl/text()"; + + public static final String XPATH_BBOX = + "/art:meta/art:mapserver/art:Box/art:coordinates/text()"; /** * the logger, used to log exceptions and additonaly information @@ -133,6 +136,8 @@ meta, XPATH_MAPSERVER_MAPFILE); String tmpTTL = XMLUtils.getStringXPath( meta, XPATH_TTL); + + String bbox = XMLUtils.getStringXPath(meta, XPATH_BBOX); String ttl = null; if (tmpTTL != null) { DateFormat df = DateFormat.getDateTimeInstance( @@ -187,7 +192,8 @@ request.setAttribute("wms_published", Boolean.TRUE); MapService mapService = new DefaultMapService("0815", layers, - "UMN", mapserverPath); + "UMN", mapserverPath, + bbox); sm.setLocalMapService(mapService); return super.execute(mapping, form, request, response); }else{