Mercurial > dive4elements > gnv-client
comparison 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 |
comparison
equal
deleted
inserted
replaced
983:45ea5feb94c0 | 984:cfc7bd35ee0b |
---|---|
59 public static final String XPATH_LAYER_NAME = | 59 public static final String XPATH_LAYER_NAME = |
60 "art:name/text()"; | 60 "art:name/text()"; |
61 | 61 |
62 public static final String XPATH_TTL = | 62 public static final String XPATH_TTL = |
63 "/art:meta/art:mapserver/art:ttl/text()"; | 63 "/art:meta/art:mapserver/art:ttl/text()"; |
64 | |
65 public static final String XPATH_BBOX = | |
66 "/art:meta/art:mapserver/art:Box/art:coordinates/text()"; | |
64 | 67 |
65 /** | 68 /** |
66 * the logger, used to log exceptions and additonaly information | 69 * the logger, used to log exceptions and additonaly information |
67 */ | 70 */ |
68 private static Logger logger = Logger.getLogger(WMSAction.class); | 71 private static Logger logger = Logger.getLogger(WMSAction.class); |
131 meta, XPATH_MAPSERVER_PATH); | 134 meta, XPATH_MAPSERVER_PATH); |
132 String mapfilePath = XMLUtils.getStringXPath( | 135 String mapfilePath = XMLUtils.getStringXPath( |
133 meta, XPATH_MAPSERVER_MAPFILE); | 136 meta, XPATH_MAPSERVER_MAPFILE); |
134 String tmpTTL = XMLUtils.getStringXPath( | 137 String tmpTTL = XMLUtils.getStringXPath( |
135 meta, XPATH_TTL); | 138 meta, XPATH_TTL); |
139 | |
140 String bbox = XMLUtils.getStringXPath(meta, XPATH_BBOX); | |
136 String ttl = null; | 141 String ttl = null; |
137 if (tmpTTL != null) { | 142 if (tmpTTL != null) { |
138 DateFormat df = DateFormat.getDateTimeInstance( | 143 DateFormat df = DateFormat.getDateTimeInstance( |
139 DateFormat.LONG, | 144 DateFormat.LONG, |
140 DateFormat.LONG, | 145 DateFormat.LONG, |
185 if (mapserverPath != null && | 190 if (mapserverPath != null && |
186 mapfilePath != null) { | 191 mapfilePath != null) { |
187 request.setAttribute("wms_published", Boolean.TRUE); | 192 request.setAttribute("wms_published", Boolean.TRUE); |
188 | 193 |
189 MapService mapService = new DefaultMapService("0815", layers, | 194 MapService mapService = new DefaultMapService("0815", layers, |
190 "UMN", mapserverPath); | 195 "UMN", mapserverPath, |
196 bbox); | |
191 sm.setLocalMapService(mapService); | 197 sm.setLocalMapService(mapService); |
192 return super.execute(mapping, form, request, response); | 198 return super.execute(mapping, form, request, response); |
193 }else{ | 199 }else{ |
194 return super.execute(mapping, form, request, response); | 200 return super.execute(mapping, form, request, response); |
195 } | 201 } |