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


A LocalLayer represents the connection to KML or raster data, and its visual representation in the view.

Object Model


Syntax

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

Example

This example demonstrates how to use the LocalLayer class and E2.AddLayer method in order to add a local KML file 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
LocalLayer kmlLayer = new LocalLayer(); 
kmlLayer.Workspace = @"C:\Temp\MyData";  // Set the folder containing the KML data. 
kmlLayer.Dataset = @"MyData.kml";  // Set the KML file name. 
kmlLayer.Connect(this._taskUI.E2);  // Connect the layer to the data. 
if (kmlLayer.IsConnected)  // If the layer is connected, then add it. 

  this._taskUI.E2.AddLayer(kmlLayer); 
}
Visual BasicCopy Code
Dim kmlLayer As LocalLayer = New LocalLayer()
kmlLayer.Workspace = "C:\Temp\MyData" ' Set the folder containing the KML data.
kmlLayer.Dataset = "MyData.kml" ' Set the KML file name.
kmlLayer.Connect(Me._taskUI.E2) ' Connect the layer to the data.
If kmlLayer.IsConnected Then
  Me._taskUI.E2.AddLayer(kmlLayer)
End If

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.Layer
      ESRI.ArcGIS.E2API.LocalLayer

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