ESRI.ArcGIS.ADF.IMS
StaticLayerDataset Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.ADF.IMS.Data Namespace : StaticLayerDataset Class




A Dataset object for static layers.

Object Model

StaticLayerDataset Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class StaticLayerDataset 
   Inherits Dataset
Visual Basic (Usage)Copy Code
Dim instance As StaticLayerDataset
C# 
[SerializableAttribute()]
public class StaticLayerDataset : Dataset 

Example

The following example prints out a list of static (pre-existing) layers in the map service. It assumes an existing MapView object, along with a label web control on the page.
C#Copy Code
System.Text.StringBuilder sb = new System.Text.StringBuilder();
 
LayerCollection lyrColl = mapView.Layers;
FeatureLayer fLayer;
ImageLayer iLayer;
 
foreach (Layer layer in lyrColl)
{
    fLayer = layer as FeatureLayer;
    if (fLayer != null)
    {
        if (fLayer.Dataset is ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset)
            sb.AppendFormat("{0}<br/>", fLayer.Name);
    }
    else
    {
        iLayer = layer as ImageLayer;
        if (iLayer != null)
        {
            if (iLayer.Dataset is ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset)
                sb.AppendFormat("{0}<br/>", iLayer.Name);
        }
    }
}
 
Label1.Text = sb.ToString();
Visual BasicCopy Code
Dim sb As New System.Text.StringBuilder()
 
Dim lyrColl As LayerCollection = mapView.Layers
Dim fLayer As FeatureLayer 
Dim iLayer As ImageLayer 
 
For Each layer As Layer In lyrColl
 
    If Typeof layer Is FeatureLayer Then
    
        fLayer = CType(layer, FeatureLayer)
 
        If Typeof fLayer.Dataset Is ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset Then
            sb.AppendFormat("{0}<br/>", fLayer.Name)
        End If
    
    ElseIf Typeof layer Is ImageLayer Then
        
        iLayer = CType(layer, ImageLayer)
        
        If Typeof iLayer.Dataset Is ESRI.ArcGIS.ADF.IMS.Data.StaticLayerDataset Then
            sb.AppendFormat("{0}<br/>", iLayer.Name)
        End If
 
    End If
Next
 
Label1.Text = sb.ToString()

Remarks

Layers that are included in the map service will have a StaticLayerDataset as their Dataset object. A StaticLayerDataset has no properties, and no information about the underlying data source for the layer is available from the ArcIMS server, other than the Fields (ESRI.ArcGIS.ADF.IMS.Data.Dataset), which may contain information on the attribute fields of the layer.

Only feature layers (FeatureLayer) and image layers (ImageLayer) in the map service will have a Dataset property. Acetate layers (AcetateLayer) have no Dataset property, even if they exist in the map service as static layers.

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

© 2011 All Rights Reserved.