comparison src/java/de/intevation/mxd/reader/FeatureLayerReader.java @ 42:395307e8b7ee

First MapScript Writer that generates valid mapfiles.
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 15 Apr 2011 14:14:49 +0200
parents a1bc7220efe7
children ef7ca23c4233
comparison
equal deleted inserted replaced
41:60ed2164035a 42:395307e8b7ee
4 4
5 import org.apache.log4j.Logger; 5 import org.apache.log4j.Logger;
6 6
7 import com.esri.arcgis.carto.ILayer; 7 import com.esri.arcgis.carto.ILayer;
8 import com.esri.arcgis.carto.FeatureLayer; 8 import com.esri.arcgis.carto.FeatureLayer;
9 import com.esri.arcgis.geodatabase.FeatureClassName;
10 import com.esri.arcgis.system.IName;
9 11
10 import org.w3c.dom.Element; 12 import org.w3c.dom.Element;
11 13
12 import de.intevation.mxd.utils.MapToXMLUtils; 14 import de.intevation.mxd.utils.MapToXMLUtils;
13 15
84 case 1: layerElement.setAttribute("type", "point"); 86 case 1: layerElement.setAttribute("type", "point");
85 } 87 }
86 88
87 layerElement.setAttribute("definition_query", 89 layerElement.setAttribute("definition_query",
88 layer.getDefinitionExpression()); 90 layer.getDefinitionExpression());
91 IName fcn = layer.getDataSourceName();
92 if(fcn instanceof FeatureClassName) {
93 FeatureClassName name = (FeatureClassName)fcn;
94 layerElement.setAttribute("data_source", name.getName());
95 }
89 96
90 return layerElement; 97 return layerElement;
91 } 98 }
92 } 99 }
93 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 100 // 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)