Mercurial > mxd2map
changeset 169:d7c8493cb345
Manage filter and expressions for sde layers.
author | vc11884admin@VC11884.win.bsh.de |
---|---|
date | Tue, 05 Jul 2011 17:52:24 +0200 (2011-07-05) |
parents | f3a539ace2a4 |
children | b9ee44070056 |
files | ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 05 17:22:03 2011 +0200 +++ b/ChangeLog Tue Jul 05 17:52:24 2011 +0200 @@ -1,3 +1,9 @@ +2011-07-05 Raimund Renkert <raimund.renkert@intevation.de> + + * src/java/de/intevation/mxd/writer/MapScriptWriter.java: + Write the layer filter attribute if a definition query exists in the + mxd and set the database prefix to all expression elements. + 2011-07-05 Raimund Renkert <raimund.renkert@intevation.de> * src/java/de/intevation/mxd/writer/FillStyleWriter.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java Tue Jul 05 17:22:03 2011 +0200 +++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java Tue Jul 05 17:52:24 2011 +0200 @@ -238,7 +238,13 @@ } else { prefix = layerElement.getAttribute("data_source"); + if(layerElement.hasAttribute("definition_query") && + !layerElement.getAttribute("definition_query").equals("")) { + layer.setFilter("where " + + layerElement.getAttribute("definition_query")); + } } + } layer.setTemplate("PleaseInsertAValidTemplateForGFI"); //Write classes. @@ -323,7 +329,7 @@ else { expression += " > " + ce.getAttribute("min_value"); } - expression += " AND ["; + expression += " AND [" + pre; expression += ce.getAttribute("expression_field_0")+ "]"; } expression += " " + ce.getAttribute("expression_operator");