# HG changeset patch # User Ingo Weinzierl # Date 1311165726 0 # Node ID a5ea28339e5b040a93ed22811381989676efd5f5 # Parent 6f8873fca9273b63152bbed6d6f02f7835e54ff0 Set the extent of created WMSLayerFacets. flys-artifacts/trunk@2372 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Jul 20 12:42:06 2011 +0000 @@ -1,3 +1,15 @@ +2011-07-20 Ingo Weinzierl + + * src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java, + src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java: + Set the extent of the created WMSLayerFacets and i18n its descriptions. + + * src/main/resources/messages.properties, + src/main/resources/messages_de_DE.properties, + src/main/resources/messages_en.properties, + src/main/resources/messages_de.properties: Added I18N strings for the + background an river axis layer. + 2011-07-20 Ingo Weinzierl * src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java: diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/RiverAxisState.java Wed Jul 20 12:42:06 2011 +0000 @@ -10,11 +10,15 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.WMSLayerFacet; +import de.intevation.flys.artifacts.resources.Resources; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; public class RiverAxisState extends OutputState { + public static final String I18N_DESCRIPTION = "floodmap.riveraxis"; + + private static final Logger logger = Logger.getLogger(RiverAxisState.class); @Override @@ -26,16 +30,20 @@ ) { logger.debug("RiverAxisState.computeInit()"); + // TODO Add config for background layer WMSLayerFacet facet = new WMSLayerFacet( 0, FLOODMAP_RIVERAXIS, - "RIVER AXIS", + Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION), ComputeType.INIT, getID(), hash, - "http://localhost/wms/"); // TODO add correct WMS URL + "http://denmark.atlas/cgi-bin/flys-wms"); // TODO add correct WMS URL facet.addLayer("riveraxis"); + // TODO determine extent based on the given geometry + facet.setExtent("6.5 49.1 7.0 49.7"); + facets.add(facet); return null; diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java Wed Jul 20 12:42:06 2011 +0000 @@ -10,11 +10,15 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.WMSLayerFacet; +import de.intevation.flys.artifacts.resources.Resources; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; public class WMSBackgroundState extends OutputState { + public static final String I18N_DESCRIPTION = "floodmap.wmsbackground"; + + private static final Logger logger = Logger.getLogger(WMSBackgroundState.class); @Override @@ -26,16 +30,20 @@ ) { logger.debug("WMSBackgroundState.computeInit()"); + // TODO Add config for background layer WMSLayerFacet facet = new WMSLayerFacet( 0, FLOODMAP_WMSBACKGROUND, - "WMS-BACKGROUND", + Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION), ComputeType.INIT, getID(), hash, "http://vmap0.tiles.osgeo.org/wms/vmap0"); facet.addLayer("basic"); + // TODO determine extent based on the given geometry + facet.setExtent("-45 -90 45 90"); + facets.add(facet); return null; diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/resources/messages.properties --- a/flys-artifacts/src/main/resources/messages.properties Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages.properties Wed Jul 20 12:42:06 2011 +0000 @@ -60,3 +60,6 @@ export.discharge.longitudinal.section.csv.header.w = W [NN + m] export.discharge.longitudinal.section.csv.header.cw = W corr. export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s] + +floodmap.wmsbackground = Background Map +floodmap.riveraxis = River Axis diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/resources/messages_de.properties --- a/flys-artifacts/src/main/resources/messages_de.properties Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de.properties Wed Jul 20 12:42:06 2011 +0000 @@ -60,3 +60,6 @@ export.discharge.longitudinal.section.csv.header.w = W [NN + m] export.discharge.longitudinal.section.csv.header.cw = W korr. export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s] + +floodmap.wmsbackground = Hintergrundkarte +floodmap.riveraxis = Flussachse diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/resources/messages_de_DE.properties --- a/flys-artifacts/src/main/resources/messages_de_DE.properties Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_de_DE.properties Wed Jul 20 12:42:06 2011 +0000 @@ -60,3 +60,6 @@ export.discharge.longitudinal.section.csv.header.w = W [NN + m] export.discharge.longitudinal.section.csv.header.cw = W korr. export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s] + +floodmap.wmsbackground = Hintergrundkarte +floodmap.riveraxis = Flussachse diff -r 6f8873fca927 -r a5ea28339e5b flys-artifacts/src/main/resources/messages_en.properties --- a/flys-artifacts/src/main/resources/messages_en.properties Wed Jul 20 12:37:54 2011 +0000 +++ b/flys-artifacts/src/main/resources/messages_en.properties Wed Jul 20 12:42:06 2011 +0000 @@ -60,3 +60,6 @@ export.discharge.longitudinal.section.csv.header.w = W [NN + m] export.discharge.longitudinal.section.csv.header.cw = W corr. export.discharge.longitudinal.section.csv.header.q = Q [m\u00b3/s] + +floodmap.wmsbackground = Background Map +floodmap.riveraxis = River Axis