Display vector tiles

A vector tile layer displaying tile data for the world symbolized with rich cartographic styling with an emphasis on the natural world.

To display vector tile layers, you need to use a client-side mapping API such as ArcGIS Maps SDKs or open source libraries. In most cases, the APIs support a class you can use to make requests to a vector tile service with a service URL. The API is responsible for requesting tiles for the visible map extent.

How to display vector tiles

The steps to display vector tiles are:

  1. Find the URL for the vector tile service you want to display.
  2. Set the service URL for the vector tile service.
  3. Add the layer to a map.

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

Use dark colors for code blocksCopy
1
https://{host}/{organizationId}/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

Code examples

Get vector tile styles

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

Use dark colors for code blocksCopy
1
https://{host}/{organizationId}/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

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 Maps SDKs optimize data access by utilizing the service functionality and caching.

Steps

  1. Create a map or scene.
  2. Get the hosted vector tile itemID or layer URL.
  3. Add the layer.
ArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for JavaScriptArcGIS Maps SDK for .NETArcGIS Maps SDK for KotlinArcGIS Maps SDK for SwiftArcGIS Maps SDK for JavaArcGIS Maps SDK for Qt (C++)ArcGIS Maps SDK for Qt (QML)ArcGIS API for PythonEsri LeafletMapLibre GL JSOpenLayers
Expand
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
        esriConfig.apiKey = "YOUR_API_KEY"

        const vectorLayer = new VectorTileLayer({
          portalItem:{
            id: "c4fc087b100542fe91df0b279df23ef9"
          },
          opacity: 0.75,
        })

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

Tutorials

Workflows

Services

API support

Use Client APIs to create, manage, and access data services. The table below outlines the level of support for each API.

CreateManageAccess
ArcGIS Maps SDK for JavaScript1
ArcGIS Maps SDK for Kotlin1
ArcGIS Maps SDK for Swift1
ArcGIS Maps SDK for Java1
ArcGIS Maps SDK for .NET1
ArcGIS Maps SDK for Qt1
ArcGIS API for Python
ArcGIS REST JS
Esri Leaflet2
MapLibre GL JS23
OpenLayers23
Full supportPartial supportNo support
  • 1. Use portal class and direct REST API requests
  • 2. Access via ArcGIS REST JS
  • 3. Requires manually setting styles for renderers

Tools

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.