Mercurial > dive4elements > river
changeset 1066:7f5426c69ee0
The WMS background's facet will now also have a SRID set.
flys-artifacts/trunk@2546 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 24 Aug 2011 08:53:11 +0000 |
parents | 193c49b7f6a3 |
children | f364410c7bc9 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java |
diffstat | 2 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Aug 24 08:42:31 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Aug 24 08:53:11 2011 +0000 @@ -1,3 +1,8 @@ +2011-08-24 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java: + Append the river's srid to the WMSLayerFacet. + 2011-08-24 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java Wed Aug 24 08:42:31 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java Wed Aug 24 08:53:11 2011 +0000 @@ -28,6 +28,9 @@ public static final String I18N_DESCRIPTION = "floodmap.wmsbackground"; + public static final String XPATH_SRID = + "/artifact-database/floodmap/river[@name=$name]/srid/@value"; + public static final String XPATH_WMS_URL = "/artifact-database/floodmap/river[@name=$name]/background-wms/@url"; @@ -37,6 +40,7 @@ protected String url; protected String layer; + protected String srid; private static final Logger logger = Logger.getLogger(WMSBackgroundState.class); @@ -68,6 +72,13 @@ Map<String, String> variables = new HashMap<String, String>(); variables.put("name", river); + srid = (String) XMLUtils.xpath( + cfg, + XPATH_SRID, + XPathConstants.STRING, + null, + variables); + url = (String) XMLUtils.xpath( cfg, XPATH_WMS_URL, @@ -99,6 +110,7 @@ url); facet.addLayer(layer); + facet.setSrid(srid); facets.add(facet);