Mercurial > mxd2map
changeset 124:0f5819732288
Set label text as class name in mapfile.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 17 Jun 2011 14:13:25 +0200 |
parents | 3c792458a716 |
children | 69a346c45836 |
files | ChangeLog src/java/de/intevation/mxd/reader/ClassBreakRendererReader.java src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 3 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Jun 17 13:36:33 2011 +0200 +++ b/ChangeLog Fri Jun 17 14:13:25 2011 +0200 @@ -1,3 +1,11 @@ +2011-06-17 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/reader/ClassBreakRendererReader.java: + Read label for classes. + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Write the label as class name. + 2011-06-17 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/writer/FillStyleWriter.java:
--- a/src/java/de/intevation/mxd/reader/ClassBreakRendererReader.java Fri Jun 17 13:36:33 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/ClassBreakRendererReader.java Fri Jun 17 14:13:25 2011 +0200 @@ -86,7 +86,7 @@ try { rendererElement.setAttribute("value", String.valueOf(renderer.getBreak(i))); - + rendererElement.setAttribute("label", renderer.getLabel(i)); rendererElement.setAttribute( "field_count", String.valueOf(renderer.getFieldCount()));
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Fri Jun 17 13:36:33 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Fri Jun 17 14:13:25 2011 +0200 @@ -208,7 +208,7 @@ for(int i = 0; i < list.getLength(); i++) { Element classElement = (Element)list.item(i); classObj co = new classObj(layer); - String name = classElement.getAttribute("name"); + String name = classElement.getAttribute("label"); if (name.equals("")) { name = layerElement.getAttribute("name"); if (list.getLength() > 1) {