Click or drag to resize
ArcGISTiledMapServiceLayer Class
Tiled ArcGIS REST map service layer.
Inheritance Hierarchy

Namespace: Esri.ArcGISRuntime.Layers
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 10.2.7.0 (10.2.7.1234)
Syntax
public sealed class ArcGISTiledMapServiceLayer : TiledLayer, 
	IQueryCopyright, ICopyright, ILegendSupport

The ArcGISTiledMapServiceLayer type exposes the following members.

Constructors
  NameDescription
Public methodArcGISTiledMapServiceLayer
Initializes a new instance of the ArcGISTiledMapServiceLayer class.
Public methodArcGISTiledMapServiceLayer(Uri)
Initializes a new instance of the ArcGISTiledMapServiceLayer class.
Top
Methods
  NameDescription
Public methodCheckAccess
Determines whether the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Public methodClearValue(DependencyProperty)
Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier.
(Inherited from DependencyObject.)
Public methodClearValue(DependencyPropertyKey)
Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey.
(Inherited from DependencyObject.)
Public methodCoerceValue
Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.
(Inherited from DependencyObject.)
Public methodEquals
Determines whether a provided DependencyObject is equivalent to the current DependencyObject.
(Inherited from DependencyObject.)
Protected methodFinalize
Finalizes an instance of the ArcGISTiledMapServiceLayer class.
(Overrides ObjectFinalize.)
Public methodGetAllDetailsAsync
Gets detailed metadata information about all layers available in the service.
Public methodGetDetailsAsync
Gets detailed metadata information about the specified layer or table available in the service.
Public methodGetHashCode
Gets a hash code for this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetLocalValueEnumerator
Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.
(Inherited from DependencyObject.)
Protected methodGetTileDataAsync
Gets the tile data for a given row, column and level.
(Overrides TiledLayerGetTileDataAsync(Int32, Int32, Int32, CancellationToken).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Returns the current effective value of a dependency property on this instance of a DependencyObject.
(Inherited from DependencyObject.)
Public methodCode exampleInitializeAsync
Loads the metadata for this layer based on the current configuration.
(Inherited from Layer.)
Protected methodInvalidate
Causes tiled layer to clear tiles.
(Inherited from TiledLayer.)
Public methodInvalidateProperty
Re-evaluates the effective value for the specified dependency property
(Inherited from DependencyObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnInitializeTiledLayerRequestedAsync
Override this method to initialize any properties and settings prior to using the map.
(Overrides TiledLayerOnInitializeTiledLayerRequestedAsync.)
Protected methodOnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data.
(Inherited from DependencyObject.)
Protected methodOnPropertyChanged(String)
Notifies listeners that a property value has changed.
(Inherited from Layer.)
Public methodReadLocalValue
Returns the local value of a dependency property, if it exists.
(Inherited from DependencyObject.)
Public methodSetCurrentValue
Sets the value of a dependency property without changing its value source.
(Inherited from DependencyObject.)
Protected methodSetLayerInitializationFailed
status must be failed - if not throw
(Inherited from Layer.)
Protected methodSetLayerStatus
Status cannot be failed or it will throw. To set Status to LayerStatus.Failed, call SetLayerInitializationFailed.
(Inherited from Layer.)
Public methodSetValue(DependencyProperty, Object)
Sets the local value of a dependency property, specified by its dependency property identifier.
(Inherited from DependencyObject.)
Public methodSetValue(DependencyPropertyKey, Object)
Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.
(Inherited from DependencyObject.)
Protected methodShouldSerializeProperty
Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
(Inherited from DependencyObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodVerifyAccess
Enforces that the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Top
Fields
  NameDescription
Public fieldStatic memberServiceUriProperty
Identifies the ServiceUri dependency property.
Public fieldStatic memberTokenProperty
Identifies the Token dependency property.
Top
Properties
  NameDescription
Public propertyBrightness
Gets or sets layer brightness level.
(Inherited from TiledLayer.)
Public propertyContrast
Gets or sets layer contrast level.
(Inherited from TiledLayer.)
Public propertyDefaultSpatialReference
Gets the default spatial reference.
(Inherited from Layer.)
Public propertyDependencyObjectType
Gets the DependencyObjectType that wraps the CLR type of this instance. 
(Inherited from DependencyObject.)
Public propertyDispatcher
Gets the Dispatcher this DispatcherObject is associated with.
(Inherited from DispatcherObject.)
Public propertyDisplayName
Gets or sets the display name.
(Inherited from Layer.)
Public propertyFullExtent
Gets the full extent of the layer in it's default spatial reference.
(Inherited from Layer.)
Public propertyGamma
Gets or sets layer gamma level.
(Inherited from TiledLayer.)
Public propertyID
Gets or sets an ID associated with this layer.
(Inherited from Layer.)
Public propertyInitializationException
Gets the initialization exception.
(Inherited from Layer.)
Public propertyIsSealed
Gets a value that indicates whether this instance is currently sealed (read-only).
(Inherited from DependencyObject.)
Public propertyIsVisible
Gets or sets the layer visibility.
(Inherited from Layer.)
Public propertyMaxScale
Gets or sets the maximum scale to display this layer at. A small number allows the map to display the layer when zooming further in.
(Inherited from Layer.)
Public propertyMinScale
Gets or sets the minimum scale to render this layer at. A large number allows the map to display the layer when zooming further out.
(Inherited from Layer.)
Public propertyOpacity
Gets or sets the opacity.
(Inherited from Layer.)
Public propertyResamplingMode
Gets or sets the resampling mode.
(Inherited from TiledLayer.)
Public propertyServiceInfo
Service metadata
Public propertyServiceUri
Gets or sets the endpoint of the map service.
Public propertyShowLegend
Gets or sets a value indicating whether this layer should show in a legend
(Inherited from Layer.)
Public propertyStatus
The Layer's Status, indicating whether it is being/has been initialized, or initialization failed.
(Inherited from Layer.)
Public propertyTileInfo
Gets the tiling scheme.
(Inherited from TiledLayer.)
Public propertyToken
Gets or sets the token used to access a secure ArcGIS service.
Top
Events
  NameDescription
Public eventLegendChanged
Occurs when the legend of the layer changed.
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)
Top
Examples

Demonstrates switching out various Basemap (via ArcGISTiledMapServiceLayer) layers served up by ArcGIS Online.

Screen shot of switching various ArcGIS Online Basemap layers in a sample code project.

XAML
<Window x:Class="BaseMaps.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013" 
    Title="MainWindow" Height="600" Width="800">

    <Grid x:Name="LayoutRoot">

        <StackPanel Orientation="Vertical">

            <!-- Add a TextBlock to hold the instructions on how to use the sample code. -->
            <TextBlock Name="TextBlock1" TextWrapping="Wrap" Height="77" />

            <StackPanel Orientation="Horizontal">

                <!-- Add a ComboBox to hold Urls to BaseMaps on ArcGIS Online. -->
                <ComboBox Name="ComboxBox1" Width="600" Margin="0,0,10,0" />

                <!-- Add a Button to switch the BaseMap layer (an ArcGISTileMapServiceLayer) in the Map Control. -->
                <Button Content="Change BaseMap" Name="Button1" Width="160" Click="Button1_Click"/>

            </StackPanel>

            <!-- Add a MapView Control. -->
            <esri:MapView x:Name="MapView1" Background="Blue" Margin="0,10,0,0" Height="458" >

                <!-- Add a Map. -->
                <esri:Map x:Name="Map1" />

            </esri:MapView>

        </StackPanel>
    </Grid>

</Window>

SPECIAL NOTE: The XAML displayed above comes from a C# project. If you are a VB.NET developer, you will need to modify the text for the x:Class namespace from "BaseMaps.MainWindow" to be just "MainWindow".

namespace BaseMaps
{

    public partial class MainWindow : System.Windows.Window
    {
        public MainWindow()
        {
            // This call is required by the designer.
            InitializeComponent();

            // Provide instructions on how to use the sample. 
            TextBlock1.Text = "When the application loads, choose a Url from the ComboBox drop-down and click the 'Change BaseMap' button. An " + 
                "ArcGISTiledMapServiceLayer will load and be displayed in the Map. The listing of Urls available come from BaseMaps available " + 
                "on ArcGIS Online (http://www.arcgis.com/features/maps/basemaps.html). Additional BaseMaps are periodically added so check back " + 
                "often for additional layer that may be available.";

            // Add the URL's for the various BaseMaps available on ArcGIS Online (http://www.arcgis.com/features/maps/basemaps.html).
            ComboxBox1.Items.Add("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"); // World Topographic Map
            ComboxBox1.Items.Add("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"); // World Street Map
            ComboxBox1.Items.Add("http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"); // Light Gray Canvas
            ComboxBox1.Items.Add("http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"); // National Geographic World Map
            ComboxBox1.Items.Add("http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer"); // Ocean Basemap
            ComboxBox1.Items.Add("http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"); // Terrain with Labels
            ComboxBox1.Items.Add("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"); // World Imagery
            ComboxBox1.Items.Add("http://tiles.arcgis.com/tiles/IEuSomXfi6iB7a25/arcgis/rest/services/World_Globe_1790/MapServer"); // World Globe 1790
            ComboxBox1.Items.Add("http://tiles.arcgis.com/tiles/IEuSomXfi6iB7a25/arcgis/rest/services/World_Globe_1812/MapServer"); // World Globe 1812
        }

        private void Button1_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // Clear out any existing layers in the Map.
            MapView1.Map.Layers.Clear();

            // Get the Url string for the various ArcGISTiledMapServiceLayer BaseMap's on ArcGIS Online.
            string myUserChoice = (string)ComboxBox1.SelectedValue;

            // Create a new ArcGISTiledMapServiceLayer and set its .ServiceUri Property.
            Esri.ArcGISRuntime.Layers.ArcGISTiledMapServiceLayer myArcGISTiledMapServiceLayer = new Esri.ArcGISRuntime.Layers.ArcGISTiledMapServiceLayer();
            myArcGISTiledMapServiceLayer.ServiceUri = myUserChoice;

            // Add the ArcGISTiledMapServiceLayer to the LayercCollection of the Map.
            MapView1.Map.Layers.Add(myArcGISTiledMapServiceLayer);
        } 
    }
}
See Also
Supported Platforms
This type is supported on the following ArcGIS Runtime .NET SDK platforms:
Windows Desktop
Windows Phone
Windows Store
Additional Examples
Hyperlink to ExampleDescription
AllLayersServiceInfo_FeatureServiceLayerInfoDemonstrates getting detailed ArcGIS Server MapServer metadata for various ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer web services.
ArcGISDynamicMapServiceLayerImageFormatShows changing the return ImageFormat for ArcGISDynamicMapServiceLayer and how that appears visually in the Map.
BaseMapsDemonstrates switching out various BaseMap (via ArcGISTiledMapServiceLayer) layers served up by ArcGIS Online.
CreateDynamicLayerInfosFromLayerInfosDemonstrates applying a custom rendering via XAML using the Dynamic Layer option of an ArcGISDynamicMapServiceLayer. Also, shows how to use the ArcGISDynamicMapServiceLayer.CreateDynamicLayerInfosFromLayerInfos Method to obtain the original rendering of the layer that was defined in the map service. The CreateDynamicLayerInfosFromLayerInfos is then used to reset the layer back to orignal rendering.
CSVLayerXamlDemonstrates defining a CsvLayer in XAML and setting the serviceUri property to a text file hosted online by the United States Geological Survey (USGS).
DynamicLayerInfoCollectionDemonstrates using various Renderers on a Dynamic Layer when the 'WorkspaceID' and 'DataSourceName' are known using a TableDataSource.
DynamicLayerInfosDemonstrates using various Renderers on a Dynamic Layer (via XAML and code-behind) when the 'WorkspaceID' and 'DataSourceName' are known using a TableDataSource.
Editor_SketchingDemonstrates sketching various geometric shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map.
EditorConfigurationDemonstrates sketching Polyline shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map. Multiple versions of customizing the symbology of the Editor are shown.
FeatureLayer_IdentifyDemonstrates performing and Identify on a FeatureLayer. The FeatureLayer.HitTestAsync method is used to select (and highlight) the feature a user clicks/taps on as well as display specific attributes for that feature.
FeatureLayer_LabelingDemonstrates labeling highway names in a FeatureLayer.
FeatureLayer_SetFeatureVisibleDemonstrates being able to turn off the visibility of a feature in a FeatureLayer by tapping on it.
FindTaskDemonstrates using the Query.FindTask operation to search for text in attribute fields of an ArcGIS Server map service and display the features found as graphics in a GraphicsLayer.
GeocodeFullAddressInputDemonstrates performing a geocode by submitting values for multiple address fields.
GeocodeSingleLineInputPerforms a single line geocode using either an online ArcGIS Locator service or a local Locator.
GeometryEngine_BufferDemonstrates using the powerful GeometryEngine local process to generate graphic buffer polygons based upon a user specified radius and mouse-clicks/taps on the map.
GeometryEngine_BufferWithUnionDemonstrates using the powerful GeometryEngine local process to generate a single graphic buffer (unioned) based upon multiple points provided by user interaction with the map.
GeometryEngine_ConvexHullDemonstrates using the powerful GeometryEngine local process to generate a convex hull graphic polygon based upon user specified mouse-clicks/taps on the map.
GeoRSSLayerWindowCreates a GeoRssLayer based on the United States Geological Survey earthquake feed and assigned a SimpleRenderer.
GetAreaAllows the user to draw a polygon on the map and calculate the area via several methods.
GraphicsLayer_LabelingDemonstrates labeling city names where two AttributeLabelClass'es are used (one for smaller cities and one for larger ones).
GraphicsLayer_RenderingModeDemonstrates setting the various GraphicsLayer.RenderingMode options and their effect on TextSymbols when the MapView is rotated.
GraphicsLayerWindowDemonstrates various Graphics and GraphicsLayer related actions.
GraphicsOverlayDemonstrates using the Query.FindTask operation to return county features in an ArcGIS Server map service and display the features found as Graphics in a GraphicsOverlay. The user can perform a MapViewTapped on the Graphics to perform a GraphicsOverlay.HitTestAsync to select features and display attribute information.
IdentifyParameter_DynamicLayerInfosDemonstrates performing an Identify on a Dynamic Layer using the ESRI.ArcGISRuntime.Tasks.Query.IdentifyParameter.DynamicLayerInfos Property.
IdentifyTaskDemonstrates using the Query.IdentifyTask operation find a feature based upon it's geographic position in an ArcGIS Server map service and display it as a graphic in a GraphicsLayer.
InitialMapExtentCodeShows how to set the initial extent of the map (Map.InitialExtent) in code.
InitialMapExtentXamlShows how to set the initial extent of the map (Map.InitialExtent) in XAML.
LayerDrawingOptionCollectionDemonstrates using the existing rendering of a Dynamic Layer sub-layer of an ArcGISDynamicMapServiceLayer and switching to a custom rendering defined in code-behind for the Dynamic Layer.
LayerDrawingOptionsDemonstrates changing the rendering of the first sub-layer of an ArcGISDynamicMapServiceLayer using the Dynamic Layer capabilities of ArcGIS Server 10.1 and higher.
LayersInitializedDemonstrates implementing logic which is dependent on the layer collection being initialized.
MapServiceInfo_DocumentInfo_LayerServiceInfoDemonstrates getting detailed ArcGIS Server MapServer metadata to obtain MapServiceInfo data for various ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer web services.
MapView_DragDropEventsDemonstrates creating a CsvLayer by performing a Drag-and-Drop from a file on the local disk in File Explorer to the MapView.
MapView_OverlaysDemonstrates displaying a UIElement on top of the MapView using the MapView.Overlays Property. This is useful for performing MapTip functionality.
MapView_SetViewDemonstrates using the various MapView.SetView Methods to adjust the extent of the map.
MultipleMapsInMapViewDemonstrates switching out different Map objects (with different layers) for the MapView.Map Property.
PictureFillSymbolDemonstrates the using a SimpleRenderer with options for PictureFillSymbol.
PictureMarkerSymbolDemonstrates the using a SimpleRenderer with options for SimpleMarkerSymbol, PictureMarkerSymbol, and TextMarkerSymbol.
PolygonBuilder_MakeIslandsShows how to use the PolygonBuilder to turn multiple independent Polygons into a single Polygon (use case: grouping island Polygons together into one record).
ProximityResultDemonstrates identifying the nearest vertex and nearest coordinate in a polyline to a user clicked point in the map via ProximityResult.
SmoothGraphicAnimationAnimates a graphic smoothly between two user defined locations by calling the MapPoint.MoveTo method at regular intervals as defined by a DispatcherTimer. The distance the point is moved each time is calculated by a quintic easing function.