changeset 59:ef1ee8e752b2

Write the symbols-file to the mapfile path.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 20 May 2011 15:48:59 +0200
parents 4e0464c620f0
children 37ff67a4991d
files ChangeLog src/java/de/intevation/mxd/writer/MapScriptWriter.java
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 20 15:34:35 2011 +0200
+++ b/ChangeLog	Fri May 20 15:48:59 2011 +0200
@@ -1,3 +1,8 @@
+2011-05-20  Raimund Renkert  <raimund.renkert@intevation.de>
+
+	* src/java/de/intevation/mxd/writer/MapScriptWriter.java:
+	  Write the symbols-file to the mapfile path.
+
 2011-05-20  Raimund Renkert  <raimund.renkert@intevation.de>
 
 	* src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
--- a/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Fri May 20 15:34:35 2011 +0200
+++ b/src/java/de/intevation/mxd/writer/MapScriptWriter.java	Fri May 20 15:48:59 2011 +0200
@@ -320,6 +320,7 @@
      * @param symbolElement The DOM object containing the attributes.
      */
     private void writeCharSymbol(symbolObj symbol, Element symbolElement) {
+        //TODO Write the symbol correctly. See Issue 3885 on trac.osgeo.org
         symbol.setFont(symbolElement.getAttribute("font"));
         symbol.setType(MS_SYMBOL_TYPE.MS_SYMBOL_TRUETYPE.swigValue());
         symbol.setAntialias(1);
@@ -336,13 +337,13 @@
             root,
             "/mxd/file",
             XPathConstants.NODE);
-        String filename = fileNode.getAttribute("name");
+        String mapFilename = fileNode.getAttribute("name");
         String path = "";
-        if(filename.contains("/")) {
-            path = filename.substring(0, filename.lastIndexOf("/"));
+        if(mapFilename.contains("/")) {
+            path = mapFilename.substring(0, mapFilename.lastIndexOf("/"));
         }
-        else if(filename.contains("\\")) {
-            path = filename.substring(0, filename.lastIndexOf("\\"));
+        else if(mapFilename.contains("\\")) {
+            path = mapFilename.substring(0, mapFilename.lastIndexOf("\\"));
         }
         symbols.save(path + "/symbols.sym");
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)