[MXD2map-commits] r299:c4fb04f6422f

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 5 16:19:23 CEST 2012


details:   http://hg.intevation.org/geospatial/mxd2map/rev/c4fb04f6422f

changeset: 299:c4fb04f6422f

user:      Andre Heinecke <aheinecke at intevation.de>

date:      Wed Sep 05 16:13:39 2012 +0200

description:
Write GROUP into grouped maps


diffstat:

 ChangeLog                                              |  5 +++++
 src/java/de/intevation/mxd/writer/MapScriptWriter.java |  7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

diffs (33 lines):

diff -r 1cbc278c956b -r c4fb04f6422f ChangeLog
--- a/ChangeLog	Tue Sep 04 17:49:17 2012 +0200
+++ b/ChangeLog	Wed Sep 05 16:13:39 2012 +0200
@@ -1,3 +1,8 @@
+2012-09-03  Andre Heinecke <aheinecke at intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	Write Layer GROUP attribute
+
 2012-09-03  Andre Heinecke <aheinecke at intevation.de>
 
 	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
diff -r 1cbc278c956b -r c4fb04f6422f src/java/de/intevation/mxd/writer/MapScriptWriter.java
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Tue Sep 04 17:49:17 2012 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Wed Sep 05 16:13:39 2012 +0200
@@ -287,11 +287,16 @@
             String lname = layerElement.getAttribute("name");
             lname = msutils.removeSpecialChars(lname);
             lname = msutils.replaceUmlauts(lname);
-            String ulname = group.replaceAll("/", ".") + "." + lname;
+            String ulgroup = group.replaceAll("/", ".");
+            String ulname = ulgroup + "." + lname;
             if(ulname.startsWith(".")) {
                 ulname = ulname.substring(1);
             }
+            if(ulgroup.startsWith(".")) {
+                ulgroup = ulgroup.substring(1);
+            }
             layer.setName(ulname);
+            layer.setGroup(ulgroup);
             layer.setUnits(units.swigValue());
             if(!group.equals("")) {
                 layer.setMetaData("wms_layer_group", group);


More information about the MXD2map-commits mailing list