Hosted vector tile layers

A vector tile layer displaying tile data for parcels published as a hosted vector tile layer

What is a hosted vector tile layer?

A hosted vector tile layer is a reference to a vector tile layer in a vector tile service used to store your data. Applications can use a vector tile layer to access and display vector tiles in a map or scene.

You use hosted vector tile layers when you want to:

  • Convert feature layers to vector tile layers.
  • Store and access data as pre-cached (static) vector tiles in PFB format.
  • Provide styles for tiles that are rendered on the client and can be re-styled.
  • Provide high-resolution rendering on different devices.
  • Create and use your own basemap layer styles with the Vector Tile Style Editor.
  • Optimize accessing and displaying large amounts of data as tiles.
  • Use vector tile data in offline applications.

How a hosted vector tile layer works

You create hosted vector tile layers by using data management tools to convert a hosted feature layer to a hosted vector tile layer. This process is known as publishing a vector tile layer. When a vector tile layer is created, an item and a vector tile service are created. The item ID is a unique identifier for the layer. You use an item page to manage the layer and the service to access the data.

Data hosting

Manage a vector tile layer

An item page allows you to manage the properties and settings for a hosted vector tile layer. You can access an item page by signing in to your developer dashboard or ArcGIS Online. Once signed in, you can set properties such as the name, description, tags, and sharing settings.

View a vector tile layer item page

To access an item page directly, use a portal search URL with the item ID. The portal URL for data hosted in the ArcGIS Platform is https://www.arcgis.com. To use this URL, the item must be shared publicly.

 
https://www.arcgis.com/home/item.html?id=<ID>

Example: https://www.arcgis.com/home/item.html?id=f0298e881b5b4743bbdf2c7d378acc84

Access a vector tile layer

You can discover information about a vector tile layer by accessing the service endpoint directly. The endpoint returns properties such as the layer name, item ID, spatial reference, extent, and tile and style information.

Get vector tile layer properties

To access the vector tile layer or get properties, use a URL with the host, unique service ID, and service name.

 
https://<host>/<uniqueID>/arcgis/rest/services/<serviceName>/VectorTileServer

Example: https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_VTL/VectorTileServer/?f=pjson

Get vector tile styles

To access the service styles, use a URL with the host, unique service ID, and path to root.json.

 
https://<host>/<uniqueID>/arcgis/rest/services/<serviceName>/VectorTileServer/resources/styles/root.json

Example: https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_VTL/VectorTileServer/resources/styles/root.json

Get vector tile layer data

To access layer data, use a URL with the host, unique service ID, and path to tiles in {z}/{y}/{x} format.

 
https://<host>/<uniqueID>/arcgis/rest/services/<serviceName>/VectorTileServer/tile/{z}/{y}/{x}.pbf

Example: https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_VTL/VectorTileServer/tile/12/1635/695.pbf

Examples

Display a vector tile layer

To display a hosted vector tile layer, you reference the layer by its URL or ID, and then add it to a map or scene. The API communicates with the service to retrieve data for the current visible extent. ArcGIS APIs optimize data access by utilizing the service functionality and caching.

Steps

  1. Create a map or scene.
  2. Get the hosted vector tile layer URL.
  3. Add the layer.
ArcGIS JS APIEsri LeafletMapbox GL JSOpenLayersArcGIS .NET APIArcGIS Android APIArcGIS iOS APIArcGIS Java APIArcGIS Qt API (C++)ArcGIS Qt API (QML)
                                                                  
<html>
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    />
    <!-- ArcGIS Mapping APIs and Location Services Guide
  Learn more: https://developers.arcgis.com/documentation/mapping-apis-and-location-services/maps/
-->
<title>ArcGIS Developer Guide: Display a vector tile layer</title>

    <style>
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    </style>

<link rel="stylesheet" href="https://js.arcgis.com/4.18/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.18/"></script>

<script>
  require([
    "esri/config",
    "esri/Map",
    "esri/layers/VectorTileLayer",
    "esri/views/MapView"

  ], function (esriConfig,Map, VectorTileLayer, MapView) {


    esriConfig.apiKey = "YOUR-API-KEY";

    const parcelsLayer = new VectorTileLayer({
      url: "https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_Styled/VectorTileServer/resources/styles/root.json",
      opacity: 0.75
    });

    const map = new Map({
      basemap: "arcgis-light-gray",
      layers: [parcelsLayer]
    });


    const view = new MapView({
      container: "viewDiv",
      center: [-118.80543,34.02700],
      zoom: 12,
      map: map,
      constraints: {
        snapToZoom: false
      }
    });
  });
</script>
</head>

<body>
<div id="viewDiv"></div>
</body>
</html>

Tutorials

Services

Feature service

Add, update, delete, and query feature data.


Vector tile service

Store and access vector tile data.


Image tile service

Store and access image tile data.

API support

Tools
Import and create dataManage data accessManage data propertiesDisplay dataQuery dataEdit data
Developer dashboardFully supportedLayers only.Layers and services only.Fully supportedNot supportedNot supported
ArcGIS OnlineFully supportedFully supportedFully supportedFully supportedFully supportedFully supported
Map ViewerCreate layers.Web maps only.Web maps and layers only.Fully supportedFully supportedFully supported
Scene ViewerNot supportedWeb scenes only.Web scenes and layers only.Fully supportedFully supportedNot supported
ArcGIS Pro (desktop)Fully supportedFully supportedFully supportedFully supportedFully supportedFully supported
Full supportPartial support (see notes)Not supported
APIs
Import and create dataDisplay dataQuery dataEdit data
ArcGIS JS APINot supportedFully supportedFully supportedFully supported
ArcGIS Android APINot supportedFully supportedFully supportedFully supported
ArcGIS iOS APINot supportedFully supportedFully supportedFully supported
ArcGIS .NET APINot supportedFully supportedFully supportedFully supported
ArcGIS Qt APINot supportedFully supportedFully supportedFully supported
ArcGIS Java APINot supportedFully supportedFully supportedFully supported
ArcGIS Python APIFully supportedNot supportedFully supportedFully supported
Esri LeafletNot supportedFully supportedRequires ArcGIS REST JSRequires ArcGIS REST JS
MapBox GL JSNot supportedFully supportedRequires ArcGIS REST JSRequires ArcGIS REST JS
OpenLayersNot supportedFully supportedRequires ArcGIS REST JSRequires ArcGIS REST JS
ArcGIS REST JSAuthentication and portal access.Not supportedFully supportedFully supported
Full supportPartial support (see notes)Not supported

Tools