[MXD2map-commits] r334:2e445968851f
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Fri Oct 26 12:46:52 CEST 2012
details: http://hg.intevation.org/geospatial/mxd2map/rev/2e445968851f
changeset: 334:2e445968851f
user: Andre Heinecke <aheinecke at intevation.de>
date: Fri Oct 26 12:45:42 2012 +0200
description:
* src/java/de/intevation/mxd/reader/WMSLayerReader.java:
Do not write WMS Verstions in the map file that mapserver
can not support
diffstat:
ChangeLog | 6 ++++++
src/java/de/intevation/mxd/reader/WMSLayerReader.java | 10 ++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 84ab3afc5610 -r 2e445968851f ChangeLog
--- a/ChangeLog Mon Oct 22 18:03:15 2012 +0200
+++ b/ChangeLog Fri Oct 26 12:45:42 2012 +0200
@@ -1,3 +1,9 @@
+2012-10-26 Andre Heinecke <aheinecke at intevation.de>
+
+ * src/java/de/intevation/mxd/reader/WMSLayerReader.java:
+ Do not write WMS Verstions in the map file that mapserver
+ can not support
+
2012-10-22 Andre Heinecke <aheinecke at intevation.de>
* contrib/installer/example/example/epsg/epsg:
diff -r 84ab3afc5610 -r 2e445968851f src/java/de/intevation/mxd/reader/WMSLayerReader.java
--- a/src/java/de/intevation/mxd/reader/WMSLayerReader.java Mon Oct 22 18:03:15 2012 +0200
+++ b/src/java/de/intevation/mxd/reader/WMSLayerReader.java Fri Oct 26 12:45:42 2012 +0200
@@ -161,8 +161,14 @@
layerElement.setAttribute("projection", wmsconn.getSRS(0));
logger.debug(wmsconn.getSRS(0));
}
- layerElement.setAttribute("wms_server_version", wmsconn.getWMSVersion());
- logger.debug(wmsconn.getWMSVersion());
+ String wms_version = wmsconn.getWMSVersion();
+ if (wms_version != "1.0.0" && wms_version != "1.0.7" &&
+ wms_version != "1.1.0" && wms_version != "1.1.1") {
+ logger.warn("WMS Version " + wms_version + " not supported by" +
+ "Mapserver. Falling back to Version 1.1.1");
+ wms_version = "1.1.1";
+ }
+ layerElement.setAttribute("wms_server_version", wms_version);
}
catch(Exception e) {
logger.debug(e);
More information about the MXD2map-commits
mailing list