ArcGIS API for Silverlight - Library Reference
ArcGISDynamicMapServiceLayer Class
Members  Example  See Also  Send comments on this topic
ESRI.ArcGIS.Client Namespace : ArcGISDynamicMapServiceLayer Class

Dynamic ArcGIS REST map service layer.

Object Model

ArcGISDynamicMapServiceLayer ClassEnvelope ClassEnvelope ClassLayerInfo ClassLayerTimeOptionCollection ClassTimeOption ClassSpatialReference ClassTable ClassTimeExtent Class

Syntax

Visual Basic (Declaration) 
Public Class ArcGISDynamicMapServiceLayer 
   Inherits DynamicMapServiceLayer
   Implements IAttributionILegendSupportISublayerVisibilitySupport 
C# 
public class ArcGISDynamicMapServiceLayer : DynamicMapServiceLayer, IAttributionILegendSupportISublayerVisibilitySupport  

Remarks

Allows working with a dynamic map service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). A dynamic map service generates images on the fly.

The background color for an ArcGISDynamicMapServiceLayer will always be transparent when the ImageFormat is set to use a lossless data compression such as PNG.

Example

XAMLCopy Code
<StackPanel Name="StackPanel1" Height="400" Width="400" Margin="0,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" >
    <esri:Map Background="White" Name="Map1" Height="200" Width="400">
         <!-- Define an ArcGISDynamicMapServiceLayer. -->
         <esri:ArcGISDynamicMapServiceLayer 
              Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer" />
    </esri:Map>
</StackPanel>
C#Copy Code
private void MainPage_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
     
  // Create an ArcGISDynamicServiceLayer. The Map1 object (a Map class) was previously defined in XAML.
  ArcGISDynamicMapServiceLayer myArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer();
 
     // Add an ArcGISDynamicMapServiceLayer.
  myArcGISDynamicMapServiceLayer.Url = "http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer";
  
  myArcGISDynamicMapServiceLayer.Initialized += new EventHandler<EventArgs>(ArcGISDynamicMapServiceLayer_Initialized);
  Map1.Layers.Add(myArcGISDynamicMapServiceLayer);
  
}
            	
private void ArcGISDynamicMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
  // Use the various ArcGISDynamicMapServiceLayer properties in this method. 
}
VB.NETCopy Code
Private Sub MainPage_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
            	
  ' Create an ArcGISDynamicServiceLayer. The Map1 object (a Map class) was previously defined in XAML.
  Dim myArcGISDynamicMapServiceLayer As New ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer
 
     ' Add an ArcGISDynamicMapServiceLayer.
  myArcGISDynamicMapServiceLayer.Url = "http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer"
  
  AddHandler myArcGISDynamicMapServiceLayer.Initialized, AddressOf ArcGISDynamicMapServiceLayer_Initialized
  Map1.Layers.Add(myArcGISDynamicMapServiceLayer)
  
End Sub
            	
Private Sub ArcGISDynamicMapServiceLayer_Initialized(ByVal sender As System.Object, ByVal e As System.EventArgs)
  ' Use the various ArcGISDynamicMapServiceLayer properties in this method. 
End Sub

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      ESRI.ArcGIS.Client.Layer
         ESRI.ArcGIS.Client.DynamicLayer
            ESRI.ArcGIS.Client.DynamicMapServiceLayer
               ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© ESRI, Inc. All Rights Reserved.