comparison src/java/de/intevation/mxd/writer/MapScriptWriter.java @ 190:c640fb351f66

Do not write layer with empty CLASS objects.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 16:00:22 +0200
parents 0965f8af70fa
children 5350621a0294
comparison
equal deleted inserted replaced
189:0965f8af70fa 190:c640fb351f66
188 XPathConstants.NODE); 188 XPathConstants.NODE);
189 NodeList list = mapNode.getElementsByTagName("layer"); 189 NodeList list = mapNode.getElementsByTagName("layer");
190 for(int i = 0; i < list.getLength(); i++) { 190 for(int i = 0; i < list.getLength(); i++) {
191 Element layerElement = (Element)list.item(i); 191 Element layerElement = (Element)list.item(i);
192 layerObj layer = new layerObj(map); 192 layerObj layer = new layerObj(map);
193 NodeList renderer = layerElement.getElementsByTagName("renderer");
194 if (renderer.getLength() == 0) {
195 continue;
196 }
193 197
194 //The layer name. 198 //The layer name.
195 String lname = layerElement.getAttribute("name"); 199 String lname = layerElement.getAttribute("name");
196 lname = lname.replaceAll(" ", ""); 200 lname = lname.replaceAll(" ", "");
197 layer.setName(validateString(lname)); 201 layer.setName(validateString(lname));
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)