Click or drag to resize

ArcGISVectorTiledLayer Class

A class that allows you to display data from an AcrGIS Vector Tile data source.
Inheritance Hierarchy

Namespace:  Esri.ArcGISRuntime.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version:
public sealed class ArcGISVectorTiledLayer : Layer

The ArcGISVectorTiledLayer type exposes the following members.

Public methodArcGISVectorTiledLayer
Initializes a new instance of the ArcGISVectorTiledLayer class.
Public methodCode exampleArcGISVectorTiledLayer(Uri)
Initializes a new instance of the ArcGISVectorTiledLayer class from the specified URI.
Public methodArcGISVectorTiledLayer(Item)
Initializes a new instance of the ArcGISVectorTiledLayer class from the specified Item.
Public methodArcGISVectorTiledLayer(VectorTileCache)
Initializes a new instance of the ArcGISVectorTiledLayer class from the specified VectorTileCache.
Public methodArcGISVectorTiledLayer(VectorTileCache, ItemResourceCache)
Initializes a new instance of the ArcGISVectorTiledLayer class from the specified VectorTileCache and ItemResourceCache.
Public propertyAttribution
Gets the attribution text for the layer.
(Inherited from Layer.)
Public propertyCanChangeVisibility
Gets a value indicating whether the layer content's visibility can be changed.
(Inherited from Layer.)
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 the full extent of the layer, which is the extent where all the data in the layer is contained.
(Inherited from Layer.)
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 propertyItemResourceCache
Gets the ItemResourceCache or null if no item resource cache is present.
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 propertyCode exampleOpacity
Gets or sets the opacity of the layer.
(Inherited from Layer.)
Public propertyShowInLegend
Gets or sets a value indicating whether the layer content participates in the legend.
(Inherited from Layer.)
Public propertySource
Gets or sets the endpoint of the vector tiled map service or the path to a vector tile package.
Public propertySourceInfo
Gets the VectorTileSourceInfo metadata.
Public propertySpatialReference
Gets the spatial reference of the layer.
(Inherited from Layer.)
Public propertyStyle
Gets the VectorTileStyle.
Public propertyCode exampleSublayerContents
Gets the sub layer contents of a layer content.
(Inherited from Layer.)
Public propertyVectorTileCache
Gets the underlying VectorTileCache or null if no vector tile cache is present.
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.)
Public eventLoaded
Occurs when the layer is loaded.
(Inherited from Layer.)
Public eventCode exampleLoadStatusChanged
Occurs when the layer LoadStatus is changed.
(Inherited from Layer.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)

Vector Tiled Layers are much like ArcGIS Tiled Layer. They are a layer in the map loaded from ArcGIS online, Portal for ArcGIS, ArcGIS for server, or a local vector tile layer package file. The tile data format is optimized to reduce network bandwidth and reduce CPU load while rendering the tiles. Vector Tiled Layers are appropriate for basemap, reference and possibly operational layers. They do not contain any feature data, and do not support identify or search operations.

Vector tiles are an alternative to raster tile basemap layers. Instead of pixels, the cartography is delivered using 2D points. The points describe lines, polygons or the locations of labels and marker symbols. The file format of tiles is binary and conforms to the Mapbox Vector Tile Specification. The vector tile file format requires much less space than raster tiles. Also, since the cartography is rendered at runtime, the differences between levels of detail appear more continuous than with raster tiles.

To create a vector tiled layer, the runtime client is given either a URI or a portal item. The URI can point to a vector tile source, a vector tile style sheet, or a local vector tile package file. The portal item will contain a URI to a vector tile stylesheet. The style sheet describes the appearance of the geometry and must be in the Mapbox GL Style format. The style sheet also contains a URI to a vector tile source. The source must be in the Mapbox TileJSON format. The source info includes a URI to a default style sheet.

More than one vector tile style sheet can use the same source. Both the source info and the style sheet are human readable JSON files.

Vector tile packages can also be downloaded from a ArcGIS Online vector tile service. The vector tile package is a single file (.vptk) that contains all of the tile data files, the source information, a style sheet, and the font and symbol marker resources required to display the map.

Vector tile packages are also distributed inside Mobile Map Packages.The MMPK contains JSON that points to the location of the vector tile style sheet or the root of the vector tile package data.



Example Name: ArcGISVectorTiledLayerUrl

Load an ArcGIS Vector Tiled Layer from a URL.

Code example screen shot.

// Copyright 2018 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:
// 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;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Controls;

namespace ArcGISRuntime.WPF.Samples.ArcGISVectorTiledLayerUrl
        "ArcGIS vector tiled layer (URL)",
        "This sample demonstrates how to create a ArcGISVectorTiledLayer and bind this to a Basemap which is used in the creation of a map.",
    public partial class ArcGISVectorTiledLayerUrl
        // Dictionary associates layer names with URIs
        private Dictionary<string, Uri> _layerUrls = new Dictionary<string, Uri>()
            {"Mid-Century", new Uri("")},
            {"Colored Pencil", new Uri("")},
            {"Newspaper", new Uri("")},
            {"Nova", new Uri("")},
            {"World Street Map (Night)", new Uri("")}

        public ArcGISVectorTiledLayerUrl()

            // Create the UI, setup the control references and execute initialization

        private void Initialize()
            // Create a new ArcGISVectorTiledLayer
            ArcGISVectorTiledLayer vectorTiledLayer = new ArcGISVectorTiledLayer(_layerUrls.Values.First());

            // Create new Map with basemap
            Map myMap = new Map(new Basemap(vectorTiledLayer));

            // Set titles as items source
            VectorLayersChooser.ItemsSource = _layerUrls.Keys;

            // Select the first item
            VectorLayersChooser.SelectedIndex = 0;

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

        private void OnVectorLayersChooserSelectionChanged(object sender, SelectionChangedEventArgs e)
            // Get the user's selection
            string selectedVectorLayer = e.AddedItems[0].ToString();

            // Get the URL from the dictionary
            Uri vectorTiledLayerUrl = _layerUrls[selectedVectorLayer];

            // Create a new ArcGISVectorTiledLayer with the URI Selected by the user
            ArcGISVectorTiledLayer vectorTiledLayer = new ArcGISVectorTiledLayer(vectorTiledLayerUrl);

            // Create new Map with basemap 
            MyMapView.Map = new Map(new Basemap(vectorTiledLayer));
<UserControl x:Class="ArcGISRuntime.WPF.Samples.ArcGISVectorTiledLayerUrl.ArcGISVectorTiledLayerUrl"
        <esri:MapView x:Name="MyMapView" />
        <Border Style="{StaticResource BorderStyle}">
                <TextBlock Text="Select a vector layer." 
                           Margin="5" TextAlignment="Center" TextWrapping="Wrap" />
                <ComboBox x:Name="VectorLayersChooser" 
See Also
Additional Examples
Hyperlink to ExampleDescription
ArcGISVectorTiledLayerUrlLoad an ArcGIS Vector Tiled Layer from a URL.