diff src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 299:c4fb04f6422f

Write GROUP into grouped maps
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 05 Sep 2012 16:13:39 +0200
parents 1cbc278c956b
children 215ae6199b95
line wrap: on
line diff
--- 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);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)