diff 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
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Thu Apr 14 11:31:29 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java	Fri Apr 15 14:14:49 2011 +0200
@@ -6,6 +6,8 @@
 
 import com.esri.arcgis.carto.ILayer;
 import com.esri.arcgis.carto.FeatureLayer;
+import com.esri.arcgis.geodatabase.FeatureClassName;
+import com.esri.arcgis.system.IName;
 
 import org.w3c.dom.Element;
 
@@ -86,6 +88,11 @@
 
         layerElement.setAttribute("definition_query",
             layer.getDefinitionExpression());
+        IName fcn = layer.getDataSourceName();
+        if(fcn instanceof FeatureClassName) {
+            FeatureClassName name = (FeatureClassName)fcn;
+            layerElement.setAttribute("data_source", name.getName());
+        }
 
         return layerElement;
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)