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


A ServerLayer represents geographical data hosted on a server.

Object Model


Syntax

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

Example

This example shows you how you can use the ServerLayer class and E2.AddLayer method in order to add a globe service to ArcGIS Explorer as a Layer, setting a minimal amount of properties and relying on default values for other properties. The example uses a bathymetry layer which is included in the default maps for ArcGIS Explorer; the details of this service are not guarenteed to be correct as the service details are subject to change, however other values can be substituted. The example assumes that the current item has a member variable _taskUI pointing to the current TaskUI.
C#Copy Code
ServerLayer svrLyr = new ServerLayer(); 
svrLyr.ServerType = esriE2ServerType.Globe; 
svrLyr.Url = @"http://services.arcgisservices.com/v92"; 
svrLyr.ServiceName = @"NASA_SatelliteBathy_World"; 
svrLyr.SubserviceName = @"NASA_SatelliteBathy_World"; 
svrLyr.DisplayName = "Bathymetry Layer"; 
svrLyr.Connect(this._taskUI.E2); 
if (svrLyr.IsConnected) 

    this._taskUI.E2.AddLayer(svrLyr); 
}
Visual BasicCopy Code
Dim svrLyr As ServerLayer = New ServerLayer()
svrLyr.ServerType = esriE2ServerType.Globe
svrLyr.Url = "http://services.arcgisservices.com/v92"
svrLyr.ServiceName = "NASA_SatelliteBathy_World"
svrLyr.SubserviceName = "NASA_SatelliteBathy_World"
svrLyr.DisplayName = "Bathymetry Layer"
svrLyr.Connect(Me._taskUI.E2)
If (svrLyr.IsConnected) Then
    Me._taskUI.E2.AddLayer(svrLyr)
End If

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.Layer
      ESRI.ArcGIS.E2API.ServerLayer

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