ESRI.ArcGIS.E2API Feedback via the User Forum
LocalVectorLayer Class
See Also  Members   Example 
ESRI.ArcGIS.E2API Namespace : LocalVectorLayer Class


A LocalVectorLayer represents the connection to a shapefile or file geodatabase, and its visual representation in the view.

Object Model



Syntax

Visual Basic (Declaration) 
<ComVisibleAttribute(False)>
Public Class LocalVectorLayer 
   Inherits Layer
Visual Basic (Usage)Copy Code
Dim instance As LocalVectorLayer
C# 
[ComVisibleAttribute(false)]
public class LocalVectorLayer : Layer 

Example

This example shows you how you can use the LocalVectorLayer class and E2.AddLayer method in order to add a local shapefile called MyData.shp to ArcGIS Explorer as a Layer. This example sets a minimal amount of properties, relying mostly on default values. The example assumes that the current item has a member variable _taskUI pointing to the current TaskUI.
C#Copy Code
LocalVectorLayer shapeFile = new LocalVectorLayer(); 
shapeFile.Workspace = @"C:\Temp\MyFolder"; // Set the folder containing the shapefile. 
shapeFile.Dataset = @"MyData.shp";  // Set the shapefile file name. 
shapeFile.SymbolName = "Blue 5"; // Set an appropriate symbol name for the geometry type. 
shapeFile.SymbolSize = 50000; // Ideally, should set an appropriate symbol size for the layer viewing range. 
shapeFile.Connect(this._taskUI.E2); // Connect the layer. 
if (shapeFile.IsConnected)  // If the layer is connected, then add it. 

  this._taskUI.E2.AddLayer(shapeFile); 
}
Visual BasicCopy Code
Dim shapeFile As LocalVectorLayer = New LocalVectorLayer()
shapeFile.Workspace = "E:\Data\Shape\Mexico" ' Set the folder containing the shapefile.
shapeFile.Dataset = "cities.shp" ' Set the shapefile file name.
shapeFile.SymbolName = "Blue 5" ' Set an appropriate symbol name for the geometry type.
shapeFile.SymbolSize = 50000 ' Ideally should set an appropriate symbol size for the layer viewing range.
shapeFile.Connect(Me._taskUI.E2) ' Connect the layer to the data.
If shapeFile.IsConnected Then
  Me._taskUI.E2.AddLayer(shapeFile)
End If

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.Layer
      ESRI.ArcGIS.E2API.LocalVectorLayer

Platforms

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Version Information

This class was added to the E2API at version 1.0.0.348.

See Also