ArcGIS Runtime SDK for WPF - Library Reference
ArcGISTiledMapServiceLayer Class
Members  Example  See Also 
ESRI.ArcGIS.Client Namespace : ArcGISTiledMapServiceLayer Class

Tiled ArcGIS REST map service layer.

Object Model

ArcGISTiledMapServiceLayer ClassEnvelope ClassEnvelope ClassLayerInfo ClassSpatialReference ClassTable ClassTileInfo ClassTimeExtent Class

Syntax

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

Remarks

General Comments:

An ArcGISTiledMapServiceLayer is a cached tiled map service published by ArcGIS Server (version 9.3 and higher) using REST. An ArcGISTiledMapServiceLayer has the following characteristics:

  • It is composed of one or more sub-layers that display some geographic phenomena in a map image.
  • Map images are pre-created cached tiles on ArcGIS Server that are requested by a WPF client application.
  • The drawing performance is typically faster than dynamically created map images using the ArcGISDynamicMapServiceLayer. However an ArcGISDynamicMapServiceLayer may be more appropriate for highly focused intranet applications and applications that are based on real-time or frequently updated data.
  • Because the images are pre-created cached tiles, re-projection on-the-fly to a different SpatialReference is not possible.

The primary advantage of the ArcGISTiledMapServiceLayer over other native ArcGIS Server Layer types (specifically: ArcGISDynamicMapServiceLayer and FeatureLayer) is performance. By generating pre-created cached tiles and storing them in an optimized file structure on ArcGIS Server, client applications can see improved draw times of geographic phenomena. This performance increase comes as a trade-off of not having the flexibility to dynamically change the drawing of geographic phenomena on-the-fly. This means that an ArcGISTiledcMapServiceLayer does not have Properties like dynamic map service layers have for things such as: LayerDefinition, Where, TimeExtent, and/or VisibleLayers which restrict which features are returned.

A call to the ArcGISTiledMapServiceLayer is Asynchronous. As a result, this means that obtaining information (i.e. get/Read) for the various Properties of an ArcGISTiledMapServiceLayer should occur in the Initialized Event or any time after the Initialized Event occurs. This ensures that information retrieved about the ArcGISTiledMapServiceLayer has been obtained after a complete round trip from ArcGIS Server. Do not be tempted to try and access ArcGISTiledMapServiceLayer Property information from generic application Events like: MainWindows.Loaded or the Constructor, etc. as the ArcGISTiledMapServiceLayer has not been Initialized and erroneous information will be returned. Likewise, ArcGISTiledMapServiceLayer Methods should not be invoked until after the ArcGISTiledMapServiceLayer Initialized Event has fired or from within the Initialized Event to avoid erroneous results.

It is highly recommended to use the ArcGISTiledMapServiceLayer InitializationFailed Event to test for valid data being returned from ArcGIS Server. Some common reasons for an ArcGISTiledMapServiceLayer failing to Initialize include the ArcGIS Server being down or an incorrect REST Url was specified. If proper error handling is not done in the ArcGISTiledMapServiceLayer InitializationFailed Event, an Unhandled Exception error message will be thrown by Visual Studio causing undesirable application termination.

For ArcGISTiledMapServiceLayer Properties that have both get/set (C#) or Read/Write (VB.NET) Properties, accessing the get/Read for a particular Property will return null/Nothing from ArcGIS Server. For all other get/set (C#) or Read/Write (VB.NET) Property values, in order to obtain get/Read information the application developer must first set/Write the values.

Specifying ArcGISTiledMapServiceLayer Property information (i.e. set/Write) can be done both in XAML and the code-behind. Using Binding syntax in XAML on ArcGISTiledMapServiceLayer Properties to obtain Property information (i.e. get/Read) returns valid results as the ArcGISTiledMapServiceLayer Initialized Event fires before any FrameworkElement Rendering occurs.

Wiring up the stub for the ArcGISTiledMapServiceLayer Initialized Event (as well as all other Events) is done by the application developer in XAML or code-behind. Creating the Event stubs is not done automatically just because an ArcGISTiledMapServiceLayer is used in an application.

ArcGISTiledMapServiceLayer’s are pre-created cached tiled map services and do not support on-the-fly re-projection. This means the ArcGISTiledMapServiceLayer will not be displayed if the Map.SpatialReference does not match the ArcGISTiledMapServiceLayer’s SpatialReference. By default, the Map.SpatialReference is determined by the first Layer in the Map. Since ArcGISTiledMapServiceLayer’s are typically the first layer in a Map to serve as a base layer for other layers to draw on top of, the ArcGISTiledMapServiceLayer often becomes the default SpatialReference for the Map.

The ArcGISTiledMapServiceLayer.GetAllDetails Method returns a Dictionary of FeatureLayerInfo objects. The FeatureLayerInfo object is rich with numerous Properties that can be used to get metadata information about the sub-layers in an ArcGISTiledMapServiceLayer web service. To get the details for a specific sub-layer in an ArcGISTiledMapServiceLayer consider using the ArcGISTiledMapServiceLayer.GetDetails instead. The Property information obtained by the FeaturLayerInfo object could be used to dynamically create a new Layer (like an ArcGISDynamicMapServiceLayer or FeatureLayer) in code-behind to display geographic information in a more targeted way. Additionally, the information from the Properties in the FeatureLayerInfo object could be used to perform QueryTask or IdentifyTask operations on the back-end database to retrieve information from the geographic location of static pixels of the cached image in the ArcGISDynamicMapServiceLayer.

NOTE: The Url that defines the REST endpoint to the ArcGISTiledMapServiceLayer can also be used for the Url of an ArcGISDynamicMapServiceLayer.

Distributing load to multiple domains or servers:

By default most browsers only make two requests to a single domain at a time. This can adversely impact the amount of time it takes to load a lot of image tiles from the same server. To resolve this you can configure your ArcGIS REST web server to work on multiple subdomains or host the ArcGIS REST web services on multiple web servers. This will enable the browser to overcome the two-requests-per-domain limitation. From Silverlight version 2.2, the ArcGISTiledMapServiceLayer supports multiple subdomains provided that the map service supports it as well (arcgis.com or ArcGIS server from version 10.1 supports it). With previous versions, the ArcGISTiledMapServiceLayer does not support multiple subdomains, but it can easily be extended to support it by creating a subclass and overriding the GetTileUrl method. In the example below this is accomplished by replacing the leading "http://www." with several subdomains.

            public class MultiDomainArcGISTiledMapServiceLayer : ArcGISTiledMapServiceLayer
            {
              private static string[] subDomains = { "http://sub1.","http://sub2.","http://sub3." };
              public override string GetTileUrl(int level, int row, int col)
              {
                // Select a subdomain based on level/row/column so that it will always
                // be the same for a specific tile. Multiple subdomains allow the user
                // to load more tiles simultanously. To take advantage of the browser cache
                // the following expression also makes sure that a specific tile will always 
                // hit the same subdomain.
                string subdomain = subDomains[(level + col + row) % subDomains.Length];
                string url = base.GetTileUrl(level, row, col);
                return url.Replace("http://www.", subdomain);
              }
            }
            

Using the ArcGIS Services Directory:

A very useful tool for developers to understand the capabilities of an ArcGISTiledMapServiceLayer published on ArcGIS Sever is the ArcGIS REST Services Directory. Simply enter the Home Url for an ArcGIS Server in the address bar of your web browser and you can begin exploring the all the ArcGIS REST Services Directory metadata information about ArcGISTiledMapServiceLayer services. The typical syntax for this Home Url is: http://[EnterYourServerNameHere]/ArcGIS/rest/services. For example, the Home Url for the free ArcGIS Online web services is: 'http://server.arcgisonline.com/arcgis/rest/services' (see the following screenshot):

Example screen shot of the ArcGIS Online web services ArcGIS REST Services Directory.

In the ArcGIS REST Services Directory, ArcGISTiledMapServiceLayers are those that have the words "(MapServer)" or "(ImageServer)" appended to the end of the map service name (and have metadata service property of Single Fused Map Cache: true. Click on the hyperlink for the "[MyMapServiceName] (MapServer)" or "[MyMapServiceName] (ImageServer)" to view the detailed metadata information about the published ArcGISTiledMapServiceLayer service. The metadata information about the ArcGISTiledMapServiceLayer contained in the ArcGIS REST Services Directory page correspond to many of the ArcGIS Runtime SDK for WPF Properties that are discoverable using client application code logic. Some particular items of interest about viewing the ArcGISTiledMapServiceLayer metadata contained in the ArcGIS REST Services Directory page include: Layers, Single Fused Map Cache, and Tile Info. The following is a brief discussion on these particular metadata items:

  • Layers: this corresponds to the ArcGISTiledMapServiceLayer.Layers Property and provides information on the sub-layers that comprise an ArcGISTiledMapServiceLayer. One of the key pieces of information obtained from the ArcGISTiledMapServiceLayer.Layers Property is the LayerInfo.ID Property. The LayerInfo.ID is the integer value of the specific sub-layer in the ArcGISTiledMapServiceLayer.

    Each sub-layer also corresponds to a FeatureLayer which has unique capabilities discussed in the conceptual document entitled 'creating a feature layer'. The Url for a specific FeatureLayer is the same Url as an ArcGISTiledMapServiceLayer with a forward slash and the integer value of the sub-layer. For example, assume an ArcGISTiledMapServiceLayer has the Url of http://dk-red2a:6080/arcgis/rest/services/UTAH_TILED_1/MapServer and it has a 5 sub-layers. If you wanted to access the first sub-layer specifically as a FeatureLayer, the Url would be: http://dk-red2a:6080/arcgis/rest/services/UTAH_TILED_1/MapServer/0. Remember that a FeatureLayer is a dynamically rendered map service from ArcGIS Server, which is quite different in nature to that of an ArcGISImageServiceLayer.

    You can determine the default ArcGISTiledMapServiceLayer sub-layer visibility as defined by the map service in ArcGIS Server by using the ArcGISTiledMapServiceLayer.GetLayerVisibility Method.

  • Single Fused Map Cache: the Single Fused Map Cache value returns a Boolean. If the Single Fused Map Cache = true then the map service is an ArcGISTiledMapServiceLayer; this also means a Tile Info metadata section will be present as well. If the Single Fused Map Cache = false then the map service IS NOT an ArcGISTiledMapServiceLayer; this also means that the Tile Info will not be present. This is a very important concept to understand! The map service must be a "(MapServer)" or "(ImageServer)" in the ArcGIS REST Services Directory AND the metadata value of Single Fused Map Cache: true must be present in order to have an ArcGISTiledMapServiceLayer. If the map service is a "(MapServer)" in the ArcGIS REST Services Directory AND the metadata value of Single Fused Map Cache: false then only a ArcGISDynamicMapServiceLayer can be utilized. If your application raises the following System.Exception error message: "{System.NotSupportedException: 'ArcGISTiledMapServiceLayer' does not support multi-layer caches. Use an 'ArcGISDynamicMapServiceLayer' instead or create a single-fused cache.}", check to make sure that the Single Fused Map Cache: true in the web service metadata.

    The following example should help to clarify this concept: Using the free ArcGIS Online map service called "World_light_Gray_Base" found at the following REST Url:

    http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer

    You will see in the ArcGIS REST Services Directory that the metadata contains the text: Single Fused Map Cache: true this means that the map service could be used to define an ArcGISTiledMapServiceLayer or an ArcGISDynamicMapServiceLayer and as such you could define XAML syntax like the following:

                 <esri:Map x:Name="Map1" WrapAround="True">
                   <esri:ArcGISTiledMapServiceLayer ID="World_Light_Gray_Base_V1"
                         Url="http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"/>
                   <esri:ArcGISTiledMapServiceLayer ID="World_Light_Gray_Base_V2"
                         Url="http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"/>
                 </esri:Map>
                 
    

    Conversly, using the free ESRI beta testing map service called "USA_1990-2000_Population_Change" found at the following REST Url:

    http://servicesbeta.esri.com/ArcGIS/rest/services/Demographics/USA_1990-2000_Population_Change/MapServer

    You will see in the ArcGIS REST Services Directory that metadata contains the text: Single Fused Map Cache: false, this means that the map service can only be used to define an ArcGISDynamicMapServiceLayer because cached tiled layers have not been generated. As such you could define XAML syntax like the following:

                 <esri:Map x:Name="Map1" WrapAround="True">
                   <esri:ArcGISDynamicMapServiceLayer ID="USA_1990-2000_Population_Change"
                         Url="http://servicesbeta.esri.com/ArcGIS/rest/services/Demographics/USA_1990-2000_Population_Change/MapServer"/>
                 </esri:Map>
                 
    
  • Tile Info: this section provides important metadata about the cached tiling scheme that is stored on the disk of ArcGIS Server for the ArcGISTiledMapServiceLayer. There are several sub-components for the Tile Info section including: Height, Width, DPI, Levels of Detail (with individual Level ID values), Format, Compression Quality, Origin, and Spatial Reference. Details about this metadata section can also be found in the ArcGIS Server document Available map cache properties.

    Height and Width are the number of pixels per cached tile for the height and width.

    Levels of Detail are the number of cached tile scales that will be generated. As a user zooms in/out and crosses certain scale level thresholds, a different set of cached tiles will be used that display the appropriate geographic phenomena in the right detail. When the ArcGISImageServiceLayer is initially published, authors have control over how many levels of detail will be provided by the service.

    Format is the image format that is used when generating the cached tiles. There are several formats to choose from when the ArcGISTiledMapService tile cache is originally created including: PNG8, PNG24, PNG32, JPEG, and Mixed. Each format has pros and cons. Of particular note is that if it is desired to have the background color of the ArcGISTiledMapServiceLayer to be transparent then use a lossless data compression such as PNG. JPG is considered a lossy data compression and as such will not show the background of the layer to be transparent, meaning it will not drape well over other background layers. This could be an important consideration of multiple ArcGISTiledMapServiceLayers will be used in the same application.

    Origin is the upper left corner of the tiling scheme for the cached tiles.

    Spatial Reference: is a combination of an ellipsoid, datum, and a coordinate system used to display geographic data of the three dimensional Earth on a two dimensional surface (such as a piece of paper of computer monitor). Read the discussion in the Map.SpatialReference Property documentation for more information. You can also access the spatial reference information using the client side ArcGISTiledMapServiceLayer.SpatialReference Property.

The following image shows a screenshot of a fictitious map service name where each of the noted metadata items for an ArcGISTiledMapServiceLayer have been highlighted and noted:

Example metadata for an ArcGISTiledMapServiceLayer.

Example

How to use:

When the application loads an ArcGISTiledMapServiceLayer will automatically be added to the Map (it was specified in XAML). Click the Button to add another ArcGISTiledMapServiceLayer to the Map (it will be added via code-behind). The ID of each layer will displayed in the TextBox.

The XAML code in this example is used in conjunction with the code-behind (C# or VB.NET) to demonstrate the functionality.

The following screen shot corresponds to the code example in this page.

Examples of how to add ArcGISTiledMapServiceLayers in XAML and code-behind.

XAMLCopy Code
<Grid x:Name="LayoutRoot" >
  
  <!-- Add a Map Control to the application. Set the Extent to Central and South America. -->
  <esri:Map x:Name="Map1" WrapAround="True" HorizontalAlignment="Left" VerticalAlignment="Top" 
        Margin="0,238,0,0" Height="350" Width="415" Extent="-11533189,-1728536,-4777686,3968875">
    
    <!-- Add an ArcGISTiledMapServiceLayer. Wire-up the Initilized Event to display information 
    about the layer in a TextBox.-->
    <esri:ArcGISTiledMapServiceLayer ID="World_Light_Gray_Base"
          Url="http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer" 
          Initialized="ArcGISTiledMapServiceLayer_Initialized"/>
    
  </esri:Map>
  
  <!-- Add a Button that will allow the user to add another ArcGISTiledMapServiceLayer via code-behind. -->
  <Button Name="Button1" Height="23" HorizontalAlignment="Left" Margin="0,209,0,0"  VerticalAlignment="Top" 
          Width="706" Content="Add another ArcGISTiledMapServiceLayer (via code-behind) for the specified Url."
          Click="Button1_Click" />
   
  <!-- TextBox to display information about about the ArcGISTiledMapServiceLayers added to the Map. -->
  <TextBox Height="350" HorizontalAlignment="Left" Margin="421,238,0,0" Name="TextBox1" VerticalAlignment="Top" 
           Width="285" />
  
  <!-- Provide the instructions on how to use the sample code. -->
  <TextBlock Height="174" HorizontalAlignment="Left" Name="TextBlock1" VerticalAlignment="Top" Width="788" 
             TextWrapping="Wrap" Text="When the application loads an ArcGISTiledMapServiceLayer will 
             automatically be added to the Map (it was specified in XAML). Click the Button to add another
             ArcGISTiledMapServiceLayer to the Map (it will be added via code-behind). The ID of each 
             layer will displayed in the TextBox." />
</Grid>
C#Copy Code
private void ArcGISTiledMapServiceLayer_Initialized(object sender, System.EventArgs e)
{
  // This function will execute as a result of the ArcGISTiledMapServiceLayer that was defined in XAML
  // being Initialized.
  
  // Get the ArcGISTiledMapServiceLayer.
  ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer = (ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)sender;
  
  // Get the ID of the ArcGISTiledMapServiceLayer.
  string myID = myArcGISTiledMapServiceLayer.ID;
  
  // Create a StringBuilder object to hold information about the ArcGISTiledMapServiceLayer and add some
  // useful information to it.
  System.Text.StringBuilder myStringBuilder = new System.Text.StringBuilder();
  myStringBuilder.Append("The 1st ArcGISTiledMapServiceLayer was" + Environment.NewLine);
  myStringBuilder.Append("added via XAML and it's ID is: " + Environment.NewLine);
  myStringBuilder.Append(myID);
  
  // Display the results of the StringBuilder text to the user.
  TextBox1.Text = myStringBuilder.ToString();
}
  
private void Button1_Click(object sender, System.Windows.RoutedEventArgs e)
{
  // This function execute as a result of the user clicking the Button. It adds an ArcGISTiledMapServiceLayer
  // using code-behind.
  
  // Create an ArcGISTiledServiceLayer. The Map1 object (a Map class) was previously defined in XAML.
  ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer2 = new ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer();
  
  // Set the Url of the ArcGISTiledServiceLayer to a public service. 
  myArcGISTiledMapServiceLayer2.Url = "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer";
  
  // Set the ID of the ArcGISTiledServiceLayer.
  myArcGISTiledMapServiceLayer2.ID = "Soil_Survey_Map";
  
  // Wire-up the Initialized Event of the ArcGISTiledServiceLayer. Note how a different Initilized Event
  // is being used verses the one defined in XAML. They could share the same Initialized Event but we created
  // two seperate ones to demonstration purposes.
  myArcGISTiledMapServiceLayer2.Initialized += ArcGISTiledMapServiceLayer_Initialized2;
  
  // Add the ArcGISTiledServiceLayer to the Map.
  Map1.Layers.Add(myArcGISTiledMapServiceLayer2);
}
  
private void ArcGISTiledMapServiceLayer_Initialized2(object sender, EventArgs e)
{
  // This function will execute as a result of the ArcGISTiledMapServiceLayer that was defined in code-behind
  // being Initialized.
  
  // Get the ArcGISTiledMapServiceLayer.
  ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer2 = (ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)sender;
  
  // Get the ID of the ArcGISTiledMapServiceLayer.
  string myID2 = myArcGISTiledMapServiceLayer2.ID;
  
  // Create a StringBuilder object to hold information about the ArcGISTiledMapServiceLayer and add some
  // useful information to it.
  System.Text.StringBuilder myStringBuilder = new System.Text.StringBuilder();
  myStringBuilder.Append(TextBox1.Text + Environment.NewLine);
  myStringBuilder.Append(Environment.NewLine);
  myStringBuilder.Append("The 2nd ArcGISTiledMapServiceLayer was" + Environment.NewLine);
  myStringBuilder.Append("added via code-behind and it's ID is: " + Environment.NewLine);
  myStringBuilder.Append(myID2);
  
  // Display the results of the StringBuilder text to the user.
  TextBox1.Text = myStringBuilder.ToString();
}
VB.NETCopy Code
Private Sub ArcGISTiledMapServiceLayer_Initialized(sender As System.Object, e As System.EventArgs)
  
  ' This function will execute as a result of the ArcGISTiledMapServiceLayer that was defined in XAML
  ' being Initialized.
  
  ' Get the ArcGISTiledMapServiceLayer.
  Dim myArcGISTiledMapServiceLayer As ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer = CType(sender, ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)
  
  ' Get the ID of the ArcGISTiledMapServiceLayer.
  Dim myID As String = myArcGISTiledMapServiceLayer.ID
  
  ' Create a StringBuilder object to hold information about the ArcGISTiledMapServiceLayer and add some
  ' useful information to it.
  Dim myStringBuilder As New Text.StringBuilder
  myStringBuilder.Append("The 1st ArcGISTiledMapServiceLayer was" + vbCrLf)
  myStringBuilder.Append("added via XAML and it's ID is: " + vbCrLf)
  myStringBuilder.Append(myID)
  
  ' Display the results of the StringBuilder text to the user.
  TextBox1.Text = myStringBuilder.ToString
  
End Sub
  
Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs)
  
  ' This function execute as a result of the user clicking the Button. It adds an ArcGISTiledMapServiceLayer
  ' using code-behind.
  
  ' Create an ArcGISTiledServiceLayer. The Map1 object (a Map class) was previously defined in XAML.
  Dim myArcGISTiledMapServiceLayer2 As New ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer
  
  ' Set the Url of the ArcGISTiledServiceLayer to a public service. 
  myArcGISTiledMapServiceLayer2.Url = "http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/Soil_Survey_Map/MapServer"
  
  ' Set the ID of the ArcGISTiledServiceLayer.
  myArcGISTiledMapServiceLayer2.ID = "Soil_Survey_Map"
  
  ' Wire-up the Initialized Event of the ArcGISTiledServiceLayer. Note how a different Initilized Event
  ' is being used verses the one defined in XAML. They could share the same Initialized Event but we created
  ' two seperate ones to demonstration purposes.
  AddHandler myArcGISTiledMapServiceLayer2.Initialized, AddressOf ArcGISTiledMapServiceLayer_Initialized2
  
  ' Add the ArcGISTiledServiceLayer to the Map.
  Map1.Layers.Add(myArcGISTiledMapServiceLayer2)
  
End Sub
  
Private Sub ArcGISTiledMapServiceLayer_Initialized2(sender As Object, e As EventArgs)
  
  ' This function will execute as a result of the ArcGISTiledMapServiceLayer that was defined in code-behind
  ' being Initialized.
  
  ' Get the ArcGISTiledMapServiceLayer.
  Dim myArcGISTiledMapServiceLayer2 As ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer = CType(sender, ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer)
  
  ' Get the ID of the ArcGISTiledMapServiceLayer.
  Dim myID2 As String = myArcGISTiledMapServiceLayer2.ID
  
  ' Create a StringBuilder object to hold information about the ArcGISTiledMapServiceLayer and add some
  ' useful information to it.
  Dim myStringBuilder As New Text.StringBuilder
  myStringBuilder.Append(TextBox1.Text + vbCrLf)
  myStringBuilder.Append(vbCrLf)
  myStringBuilder.Append("The 2nd ArcGISTiledMapServiceLayer was" + vbCrLf)
  myStringBuilder.Append("added via code-behind and it's ID is: " + vbCrLf)
  myStringBuilder.Append(myID2)
  
  ' Display the results of the StringBuilder text to the user.
  TextBox1.Text = myStringBuilder.ToString
  
End Sub

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         ESRI.ArcGIS.Client.Layer
            ESRI.ArcGIS.Client.TiledLayer
               ESRI.ArcGIS.Client.TiledMapServiceLayer
                  ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer

Requirements

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

See Also

© ESRI, Inc. All Rights Reserved.