# HG changeset patch # User raimund renkert # Date 1311259956 -7200 # Node ID 07b991b940abd4a506915588ce77bd07accc9ea3 # Parent 52b918f958d0023ff6c50404c4a070b029704df6 Concatenate grouplayer name and layer name to have a unique identifier for each layer. diff -r 52b918f958d0 -r 07b991b940ab ChangeLog --- a/ChangeLog Thu Jul 21 16:17:30 2011 +0200 +++ b/ChangeLog Thu Jul 21 16:52:36 2011 +0200 @@ -1,3 +1,9 @@ +2011-07-21 Raimund Renkert + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Concatenate grouplayer name and layer name to have a unique + identifier for each layer. + 2011-07-21 Raimund Renkert * src/java/de/intevation/mxd/writer/MapScriptWriter.java: diff -r 52b918f958d0 -r 07b991b940ab src/java/de/intevation/mxd/writer/MapScriptWriter.java --- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Thu Jul 21 16:17:30 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Thu Jul 21 16:52:36 2011 +0200 @@ -199,17 +199,20 @@ } //The layer name. - String lname = layerElement.getAttribute("name"); - lname = lname.replaceAll(" ", ""); - layer.setName(validateString(lname)); - layer.setUnits(units.swigValue()); - layer.setMetaData("wms_title", validateString(lname)); + String group = ""; if(layerElement.hasAttribute("group")) { - String group = layerElement.getAttribute("group"); + group = layerElement.getAttribute("group"); group = validateString(group); group = group.replaceAll (" ", ""); layer.setGroup(group); } + String lname = layerElement.getAttribute("name"); + lname = lname.replaceAll(" ", ""); + lname = group + "." + lname; + layer.setName(validateString(lname)); + layer.setUnits(units.swigValue()); + layer.setMetaData("wms_title", validateString(lname)); + //The layer status. String stat = layerElement.getAttribute("status");