Mercurial > mxd2map
changeset 299:c4fb04f6422f
Write GROUP into grouped maps
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 05 Sep 2012 16:13:39 +0200 (2012-09-05) |
parents | 1cbc278c956b |
children | 215ae6199b95 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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@intevation.de> + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Write Layer GROUP attribute + 2012-09-03 Andre Heinecke <aheinecke@intevation.de> * 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);