Example #1
0
        private static FeatureDataSourceBase GetDataSource(CatalogFeatureClass catalogFeatureClass)
        {
            FeatureDataSourceBase ds = null;
            string name = catalogFeatureClass.Name;
            SpatialFeatureClass fetc = catalogFeatureClass.Tag as SpatialFeatureClass;

            ds = new SpatialDbDataSource(name, fetc._connString + "@" + fetc.DataTable);
            return(ds);
        }
Example #2
0
        private void DisplayFeatureClass(CatalogFeatureClass catalogFeatureClass)
        {
            SpatialFeatureClass   fetclass = catalogFeatureClass.Tag as SpatialFeatureClass;
            FeatureDataSourceBase ds       = new SpatialDbDataSource(fetclass.Name, fetclass.ConnString + "@" + fetclass.DataTable);
            FeatureClass          fetc     = new FeatureClass(ds);
            IFeatureLayer         lyr      = new FeatureLayer(fetclass.Name, fetc);
            IMap map = new Map(new IFeatureLayer[] { lyr });

            mapControl1.Apply(map);
            mapControl1.ReRender();
        }