A Workspace object that points to a shapefile data source.
Object Model
Syntax
Example
The following example creates a new ShapeWorkspace, and uses it to create a new dynamic layer to add to an existing MapView.
C# | Copy Code |
---|
string shapeDirectory = @"D:\Data\";
ESRI.ArcGIS.ADF.IMS.Data.ShapeWorkspace newShapeWS;
newShapeWS = new ESRI.ArcGIS.ADF.IMS.Data.ShapeWorkspace("dynamicShapeWorkspace", shapeDirectory);
ESRI.ArcGIS.ADF.IMS.Data.FeatureDataset citiesDataset;
citiesDataset = new ESRI.ArcGIS.ADF.IMS.Data.FeatureDataset("Cities", newShapeWS);
ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer newCitiesLayer;
newCitiesLayer = new ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer("DynamicCitiesLayer", citiesDataset);
mapView.Layers.Add(newCitiesLayer); |
Visual Basic | Copy Code |
---|
Dim shapeDirectory As String = "D:\Data\"
Dim newShapeWS As New _
ESRI.ArcGIS.ADF.IMS.Data.ShapeWorkspace("dynamicShapeWorkspace", shapeDirectory)
Dim citiesDataset As New _
ESRI.ArcGIS.ADF.IMS.Data.FeatureDataset("Cities", newShapeWS)
Dim newCitiesLayer As New _
ESRI.ArcGIS.ADF.IMS.Carto.Layer.FeatureLayer("DynamicCitiesLayer", citiesDataset)
mapView.Layers.Add(newCitiesLayer) |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also