[Dive4elements-commits] [PATCH] Make floodmap riveraxis layer name configurable
Wald Commits
scm-commit at wald.intevation.org
Tue Dec 4 13:20:51 CET 2012
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1354623638 -3600
# Node ID 02cf2b1dff84a02a734f168695ee5ad962a313b0
# Parent d35d316049e8738db511770641006aa55699ff79
Make floodmap riveraxis layer name configurable.
diff -r d35d316049e8 -r 02cf2b1dff84 flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java Mon Dec 03 21:16:15 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DigitizePanel.java Tue Dec 04 13:20:38 2012 +0100
@@ -2,6 +2,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
+
import com.smartgwt.client.types.Encoding;
import com.smartgwt.client.types.VerticalAlignment;
import com.smartgwt.client.util.SC;
@@ -161,7 +162,6 @@
defaultSet = true;
}
- // I was here.
for (DataItem item: d.getItems()) {
if (!defaultSet && first) {
initial.put(d.getLabel(), item.getStringValue());
@@ -246,7 +246,7 @@
parameterList.registerCollectionViewTabHandler(this);
WMS axis = getLayer(
- mapInfo.getWmsUrl(), "FLYS-Map", // FIXME: Make layer name configurable
+ mapInfo.getWmsUrl(), mapInfo.getWmsLayers(),
mapInfo.getProjection(), false);
WMS back = getLayer(
mapInfo.getBackgroundWmsUrl(), mapInfo.getBackgroundWmsLayers(),
diff -r d35d316049e8 -r 02cf2b1dff84 flys-client/src/main/java/de/intevation/flys/client/server/FileUploadServiceImpl.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/FileUploadServiceImpl.java Mon Dec 03 21:16:15 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/FileUploadServiceImpl.java Tue Dec 04 13:20:38 2012 +0100
@@ -37,7 +37,7 @@
String url = getServletContext().getInitParameter("server-url");
- Document request = createFileXML(req);;
+ Document request = createFileXML(req);
if (request == null) {
return;
diff -r d35d316049e8 -r 02cf2b1dff84 flys-client/src/main/java/de/intevation/flys/client/server/MapInfoServiceImpl.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MapInfoServiceImpl.java Mon Dec 03 21:16:15 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapInfoServiceImpl.java Tue Dec 04 13:20:38 2012 +0100
@@ -1,24 +1,20 @@
package de.intevation.flys.client.server;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.apache.log4j.Logger;
-
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import de.intevation.artifacts.common.utils.XMLUtils;
import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator;
-
import de.intevation.artifacts.httpclient.exceptions.ConnectionException;
import de.intevation.artifacts.httpclient.http.HttpClient;
import de.intevation.artifacts.httpclient.http.HttpClientImpl;
-
+import de.intevation.flys.client.client.services.MapInfoService;
import de.intevation.flys.client.shared.exceptions.ServerException;
import de.intevation.flys.client.shared.model.BBox;
import de.intevation.flys.client.shared.model.MapInfo;
-import de.intevation.flys.client.client.services.MapInfoService;
+import org.apache.log4j.Logger;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
/**
@@ -47,6 +43,9 @@
public static final String XPATH_RIVER_WMS =
"/mapinfo/river/river-wms/@url";
+ public static final String XPATH_RIVER_WMS_LAYERS =
+ "/mapinfo/river/river-wms/@layers";
+
public static final String XPATH_WMS_URL =
"/mapinfo/river/background-wms/@url";
@@ -57,6 +56,7 @@
"mapinfo_service_no_result";
+ @Override
public MapInfo getMapInfo(String locale, String river)
throws ServerException
{
@@ -113,7 +113,8 @@
String bboxS = XMLUtils.xpathString(result, XPATH_BBOX, null);
BBox bbox = BBox.getBBoxFromString(bboxS);
- String riverWMS = XMLUtils.xpathString(result, XPATH_RIVER_WMS, null);
+ String riverWMS = XMLUtils.xpathString(result, XPATH_RIVER_WMS, null);
+ String riverLayers = XMLUtils.xpathString(result, XPATH_RIVER_WMS_LAYERS, null);
String wmsURL = XMLUtils.xpathString(result, XPATH_WMS_URL, null);
String wmsLayers = XMLUtils.xpathString(result, XPATH_WMS_LAYERS, null);
@@ -126,7 +127,7 @@
// do nothing
}
- return new MapInfo(river, srid, bbox, riverWMS, wmsURL, wmsLayers);
+ return new MapInfo(river, srid, bbox, riverWMS, riverLayers, wmsURL, wmsLayers);
}
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r d35d316049e8 -r 02cf2b1dff84 flys-client/src/main/java/de/intevation/flys/client/server/features/XMLFileFeatures.java
--- a/flys-client/src/main/java/de/intevation/flys/client/server/features/XMLFileFeatures.java Mon Dec 03 21:16:15 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/features/XMLFileFeatures.java Tue Dec 04 13:20:38 2012 +0100
@@ -32,7 +32,7 @@
public XMLFileFeatures(String filename) throws IOException {
FileInputStream finput = new FileInputStream(filename);
-
+ logger.debug("XMLFileFeatures: " + filename);
try {
Document doc = XMLUtils.parseDocument(finput);
diff -r d35d316049e8 -r 02cf2b1dff84 flys-client/src/main/java/de/intevation/flys/client/shared/model/MapInfo.java
--- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/MapInfo.java Mon Dec 03 21:16:15 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/MapInfo.java Tue Dec 04 13:20:38 2012 +0100
@@ -5,12 +5,13 @@
public class MapInfo implements Serializable {
- private static final long serialVersionUID = 6691651140549280493L;
+ private static final long serialVersionUID = 6691651140549280494L;
protected String river;
protected int srid;
protected BBox bbox;
protected String wmsUrl;
+ protected String wmsLayers;
protected String backgroundWmsUrl;
protected String backgroundWmsLayers;
@@ -24,6 +25,7 @@
int srid,
BBox bbox,
String wmsUrl,
+ String wmsLayers,
String backgroundWmsUrl,
String backgroundWmsLayers)
{
@@ -31,6 +33,7 @@
this.srid = srid;
this.bbox = bbox;
this.wmsUrl = wmsUrl;
+ this.wmsLayers = wmsLayers;
this.backgroundWmsUrl = backgroundWmsUrl;
this.backgroundWmsLayers = backgroundWmsLayers;
}
@@ -61,6 +64,11 @@
}
+ public String getWmsLayers() {
+ return wmsLayers;
+ }
+
+
public String getBackgroundWmsUrl() {
return backgroundWmsUrl;
}
More information about the Dive4elements-commits
mailing list