Mercurial > mxd2map
changeset 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 | 4ebba3c52924 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 <raimund.renkert@intevation.de> + + * 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 <raimund.renkert@intevation.de> * 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");