Click or drag to resize

ArcGISTiledLayer Class

This class allows you to display data from an ArcGIS Server map service or a local TileCache by using previously generated tiles.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
Syntax
public sealed class ArcGISTiledLayer : ImageTiledLayer, 
	IApiKeyResource

The ArcGISTiledLayer type exposes the following members.

Constructors
  NameDescription
Public methodArcGISTiledLayer
Initializes a new instance of the ArcGISTiledLayer class.
Public methodCode exampleArcGISTiledLayer(Uri)
Initializes a new instance of the ArcGISTiledLayer class from the specified URI.
Public methodArcGISTiledLayer(Item)
Initializes a new instance of the ArcGISTiledLayer class from the specified Item.
Public methodCode exampleArcGISTiledLayer(TileCache)
Initializes a new instance of the ArcGISTiledLayer class from a local TileCache.
Top
Properties
  NameDescription
Public propertyApiKey
Gets or sets the unique key generated from ArcGIS Developers website.
Public propertyAttribution
Gets the attribution text for the layer.
(Inherited from Layer.)
Public propertyBrightness
Gets or sets layer brightness level.
(Inherited from ImageAdjustmentLayer.)
Public propertyCanChangeVisibility
Gets a value indicating whether the layer content's visibility can be changed.
(Inherited from Layer.)
Public propertyContrast
Gets or sets layer contrast level.
(Inherited from ImageAdjustmentLayer.)
Public propertyCredential
Gets or sets the Credential used to access a remote service.
Public propertyDescription
Gets the description for the layer.
(Inherited from Layer.)
Public propertyCode exampleFullExtent
Gets or sets the full extent of this layer.
(Inherited from ImageTiledLayer.)
Public propertyGamma
Gets or sets layer gamma level.
(Inherited from ImageAdjustmentLayer.)
Public propertyCode exampleId
Gets or sets an identifier for the layer
(Inherited from Layer.)
Public propertyIsIdentifyEnabled
Gets a value indicating whether the layer supports the identify operation.
(Inherited from Layer.)
Public propertyIsVisible
Gets or sets a value indicating whether the layer content is visible.
(Inherited from Layer.)
Public propertyItem
Gets the ArcGIS Item
(Inherited from Layer.)
Public propertyLoadError
Gets the load error of the layer, if there is one.
(Inherited from Layer.)
Public propertyCode exampleLoadStatus
Gets the load status of the layer.
(Inherited from Layer.)
Public propertyCode exampleMaxScale
Gets or sets the maximum scale where the layer is visible.
(Inherited from Layer.)
Public propertyCode exampleMinScale
Gets or sets the minimum scale where the layer is visible.
(Inherited from Layer.)
Public propertyCode exampleName
Gets or sets the name of the layer content.
(Inherited from Layer.)
Public propertyNoDataTileBehavior
Gets or sets the NoDataTileBehavior for the . The value controls how a tile returning 'NoData' will be resampled.
(Inherited from ImageTiledLayer.)
Public propertyCode exampleOpacity
Gets or sets the opacity of the layer.
(Inherited from Layer.)
Public propertyRefreshInterval
Gets or sets the refresh interval on an ArcGISTiledLayer.
Public propertyServiceInfo
Gets the map service information.
Public propertyShowInLegend
Gets or sets a value indicating whether the layer content participates in the legend.
(Inherited from Layer.)
Public propertyCode exampleSource
Gets or sets the endpoint of the map service or the path to a local tile package.
Public propertySpatialReference
Gets the spatial reference of the layer.
(Inherited from Layer.)
Public propertyCode exampleSublayerContents
Gets the sub layer contents of a layer content.
(Inherited from Layer.)
Public propertySublayers
Gets a read-only collection of ArcGISSublayer objects in the ArcGISTiledLayer.
Public propertyTileCache
Gets the TileCache representing information about a local tile package.
Public propertyTileInfo
Gets or sets the tiling scheme information for this layer.
(Inherited from ImageTiledLayer.)
Top
Methods
  NameDescription
Public methodCancelLoad
Cancels an ongoing load.
(Inherited from Layer.)
Public methodCode exampleClone
Clones this instance of Layer and its members.
(Inherited from Layer.)
Public methodGetLegendInfosAsync
Returns an immutable list of LegendInfo.
(Inherited from Layer.)
Public methodIsVisibleAtScale
Returns the layer content's effective visibility at the specified scale.
(Inherited from Layer.)
Public methodCode exampleLoadAsync
Initiates loading of a layer
(Inherited from Layer.)
Public methodRetryLoadAsync
Retry loading the layer.
(Inherited from Layer.)
Top
Events
  NameDescription
Public eventLoaded
Occurs when the layer is loaded.
(Inherited from Layer.)
Public eventLoadStatusChanged
Occurs when the layer LoadStatus is changed.
(Inherited from Layer.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)
Top
Remarks

ArcGIS tiled layers consume image tiles provided by an ArcGIS map service or a tile package. Raster tiles are cached by the server at various scales instead of dynamically generating map images at the request of the client application. The client requests the tiles needed at a particular map extent. You can use the ExportTileCacheTask class to generate and download tiles from the service, creating a tile package (.tpk/.tpkx) for use locally on the device. Alternatively, you can use ArcGIS Pro to create a map tile package and provision it to the device. Note: You can tell if an ArcGIS map server is hosting a compatible ArcGISTiledLayer when the Single Fused Map Cache is set to true in the ArcGIS REST Services Directory.

Functional characteristics

ArcGIS tiled layers do not support re-projection, query, select, identify, or editing.

Performance characteristics

Image tiled based layers (those that derive functionality from the ImageTiledLayer class) provide fast display of geographic information stored in raster files. These rasters typically contain image data acquired from satellite, aircraft, or drones. The resolution of such imagery can be very high, providing a detailed view. With increased resolution comes increased file sizes and potentially slower performance.

Raster tiling is a process that re-samples the pixel size at different scales to create images with the appropriate resolution for each scale. The tiling process creates level-of-detail pyramids to efficiently manage how much detail you see as you zoom in and out on the map. Typically, as you zoom closer to the Earth's surface, you want to see greater detail of the geographic information. Tiled image layers allow you to see just the information you need very quickly based on the level-of-detail pyramid at a particular scale, rather than having to load a single large image at once.

Tiles are generated by the server when the service is created. Requests for tiles are made on multiple threads and handled asynchronously. The size of each returned tile increases as the resolution or complexity of the image in the tile increases. For example, high-resolution imagery tiles can result in larger in file sizes than topographic mapping for the same area and map extent.

Sample Code:

Examples

WPF

Example Name: ArcGISTiledLayerUrl

Load an ArcGIS tiled layer from a URL.

Code example screen shot.

C#
// Copyright 2016 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Mapping;
using System;

namespace ArcGISRuntime.WPF.Samples.ArcGISTiledLayerUrl
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "ArcGIS tiled layer",
        category: "Layers",
        description: "Load an ArcGIS tiled layer from a URL.",
        instructions: "Launch the app to view the \"World Topographic Map\" tile layer as the basemap. ",
        tags: new[] { "basemap", "layers", "raster tiles", "tiled layer", "visualization" })]
    public partial class ArcGISTiledLayerUrl
    {
        public ArcGISTiledLayerUrl()
        {
            InitializeComponent();

            // Create the UI, setup the control references and execute initialization 
            Initialize();
        }

        private void Initialize()
        {
            // Create new Map
            Map myMap = new Map();

            // Create uri to the tiled service
            Uri serviceUri = new Uri(
               "https://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer");

            // Create new tiled layer from the url
            ArcGISTiledLayer imageLayer = new ArcGISTiledLayer(serviceUri);

            // Add created layer to the basemaps collection
            myMap.Basemap.BaseLayers.Add(imageLayer);

            // Assign the map to the MapView
            MyMapView.Map = myMap;
        }

    }
}
XAML
<UserControl 
    x:Class="ArcGISRuntime.WPF.Samples.ArcGISTiledLayerUrl.ArcGISTiledLayerUrl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013" 
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <esri:MapView x:Name="MyMapView"/>
    </Grid>
</UserControl>
See Also
Additional Examples
Hyperlink to ExampleDescription
ArcGISTiledLayerUrlLoad an ArcGIS tiled layer from a URL.
ChangeViewpointSet the map view to a new viewpoint.
DisplayLayerViewStateDetermine if a layer is currently being viewed.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
ExportTilesDownload tiles to a local tile cache file stored on the device.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
IntegratedWindowsAuthConnect to an IWA secured Portal and search for maps.
LocalServerGeoprocessingCreate contour lines from local raster data using a local geoprocessing package `.gpk` and the contour geoprocessing tool.
OfflineGeocodeGeocode addresses to locations and reverse geocode locations to addresses offline.
OfflineRoutingSolve a route on-the-fly using offline data.
TokenSecuredChallengeThis sample demonstrates how to prompt the user for a username and password to authenticate with ArcGIS Server to access an ArcGIS token-secured service. Accessing secured services requires a login that's been defined on the server.