comparison src/java/de/intevation/mxd/writer/LineStyleWriter.java @ 184:c79c3c6fc99a

Always save a symbol set, use the mapfile name as prefix for the symbol set and use the mapfile path to save the symbol set.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 12:23:57 +0200
parents 0bde090506f9
children df4e0946ef02
comparison
equal deleted inserted replaced
183:fe6dbfc86144 184:c79c3c6fc99a
127 catch(NumberFormatException nfe) { 127 catch(NumberFormatException nfe) {
128 logger.warn("Could not set miter limit."); 128 logger.warn("Could not set miter limit.");
129 } 129 }
130 } 130 }
131 131
132 String type = symbolElement.getAttribute("type"); 132
133 if(type.equals("marker")) {
134 SymbolWriter sw = new SymbolWriter(this.map, this.cl);
135 sw.write(symbolElement);
136 String name = symbolElement.getAttribute("name");
137 style.setSymbolByName(map, name);
138 symbolObj sym = symbolSet.getSymbolByName(name);
139 }
140 133
141 //The following lines are for dashed and/or dotted lines. 134 //The following lines are for dashed and/or dotted lines.
142 if(symbolElement.hasAttribute("linestyle")) { 135 if(symbolElement.hasAttribute("linestyle")) {
143 String ls = symbolElement.getAttribute("linestyle"); 136 String ls = symbolElement.getAttribute("linestyle");
144 double[] vals; 137 double[] vals;
200 } 193 }
201 catch(NumberFormatException nfe) { 194 catch(NumberFormatException nfe) {
202 logger.warn("Could not write PATTERN."); 195 logger.warn("Could not write PATTERN.");
203 } 196 }
204 } 197 }
198 String type = symbolElement.getAttribute("type");
199 if(type.equals("marker")) {
200 SymbolWriter sw = new SymbolWriter(this.map, this.cl);
201 sw.write(symbolElement);
202 String name = symbolElement.getAttribute("name");
203 style.setSymbolByName(map, name);
204 symbolObj sym = symbolSet.getSymbolByName(name);
205 }
206 else {
207 try {
208 SymbolWriter sw = new SymbolWriter (this.map, this.cl);
209 sw.saveSymbolSet (symbolSet);
210 }
211 catch (Exception e) {
212 logger.warn("Could not write symbol set.");
213 }
214 }
215
205 return false; 216 return false;
206 } 217 }
207 } 218 }
208 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 219 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)