Mercurial > mxd2map
diff src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 205:07b991b940ab
Concatenate grouplayer name and layer name to have a unique identifier for each
layer.
author | raimund renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 21 Jul 2011 16:52:36 +0200 |
parents | 52b918f958d0 |
children | 448a2fd085e0 |
line wrap: on
line diff
--- 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");