Vector tile service

A vector tile service is a type of data service that stores and provides access to vector tiles and vector tile style resources. A vector tile service can also package vector tiles for offline use as vector tile packages. Vector tile services are created and managed using data management tools and are accessed with a REST API.

Mapping applications typically use client APIs and vector tile services to access and display vector tiles in a map or scene ArcGIS Runtime APIs do not currently support vector tiles in scenes..

Parcel data stored as vector tiles in a vector tile service

Key features

  • Securely store vector tiles in the ArcGIS Platform.
  • Define custom styles for displaying vector tiles in mapping applications.
  • Efficiently display large amounts of geographic data at native screen resolution.
  • Create vector tile services from feature layers.
  • Access and view vector tiles while offline.

How to use a vector tile service

You typically use a vector tile service by:

  1. Creating a vector tile service using data managament tools.
  2. Accessing the style definition and style resources for the vector tile service.
  3. Displaying vector tiles from the vector tile service in a map or scene using the style definition.

How a vector tile service works

A vector tile service is accessed using the base service URL and consists of properties describing the service. Some key properties are:

  • Name
  • Style resource URL
  • Tile URL template
  • Tile Map URL
  • Default geographic extent for viewing tiles
  • Bounding geographic extent for all tiles
  • Tiling information

A vector tile service also provides:

  • A REST API for programmatic access.
  • Operations for working offline with vector tiles stored in the vector tile service.

Vector tile service URL

To access a vector tile service, use the host, unique service ID, and service name.

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

For example:

 
https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_Styled_VTL/VectorTileServer

Parameters

f

The format (f) parameter defines how data is returned.

  • Use json (or omit the f parameter) to get JSON for parsing in an application.
  • Use html to view a web page for exploring service properties.

Vector tile style URL

To access a vector tile service style, use the host, unique service ID, and service name, and read the defaultStyles property of the vector tile service. This is usually resources/styles. The style json can be found at resource/styles/root.json.

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

For example:

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

Vector tile URL

To get an individual vector tile from a vector tile service style, use the host, unique service ID, and service name, and read the tiles property of the vector tile service. Tiles are typically found at tile/{z}/{y}/{x}.pbf and are downloaded in protocol buffer file format.

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

For example:

 
https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/ArcGIS/rest/services/Santa_Monica_Mountains_Parcels_Styled_VTL/VectorTileServer/tile/0/0/0.pbf

Examples

Get vector tile service properties

Get the vector tile service properties for this service as JSON, including the URL components needed to access style resources and tiles.

The service is shared with everyone, so no token is required.

RequestResponseStyle JSON
 
https://vectortileservices3.arcgis.com/GVgbJbqm8hXASVYi/arcgis/rest/services/Santa_Monica_Mountains_Parcels_Styled_VTL/VectorTileServer/
{
  "currentVersion": 10.81,
  "name": "Santa_Monica_Mountains_Parcels_Styled_VTL",
  "capabilities": "TilesOnly,Tilemap",
  "type": "indexedVector",
  "serviceItemId": "673628c8a10d478a9dd7ded29cfc7df3",
  "publishJobId": "964788ec-9bff-46ca-97d6-c3770d64eb05",
  "jobServiceId": "8c6a6b0d-b219-445e-88c7-3e8d8fe8adc8",
  "ownerUserName": "",
  "serviceDescription": "",
  "description": "",
  "isEnabled": true,
  "id": 278,
  "sourceServiceName": "Santa_Monica_Mountains_Parcels_Styled",
  "sourceServiceType": "FeatureServer",
  "tileContainerName": "cd6d5a4928e843a987875ba5c4de1faf",
  "creationDate": 1607983405530,
  "datasource": "db",
  "tileMap": "tilemap",
  "defaultStyles": "resources/styles",
  "tiles": [
    "tile/{z}/{y}/{x}.pbf"
  ],
  "exportTilesAllowed": false,
  "initialExtent": {
    "xmin": -13240863.776,
    "ymin": 4023715.140299998,
    "xmax": -13173870.3567,
    "ymax": 4054853.8936000015,
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    }
  },
  "fullExtent": {
    "xmin": -13240863.776,
    "ymin": 4023715.140299998,
    "xmax": -13173870.3567,
    "ymax": 4054853.8936000015,
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    }
  },
  "minScale": 295828763.795777,
  "maxScale": 564.248588,
  "maxZoom": 19,
  "tileInfo": {
    "rows": 512,
    "cols": 512,
    "dpi": 96,
    "preciseDpi": 96,
    "format": "indexedVector",
    "origin": {
      "x": -20037508.342787,
      "y": 20037508.342787
    },
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    },
    "lods": [
      {
        "level": 0,
        "resolution": 78271.51696399994,
        "scale": 295828763.795777
      },
      {
        "level": 1,
        "resolution": 39135.7584820001,
        "scale": 147914381.897889
      },
      {
        "level": 2,
        "resolution": 19567.87924099992,
        "scale": 73957190.948944
      },
      {
        "level": 3,
        "resolution": 9783.93962049996,
        "scale": 36978595.474472
      },
      {
        "level": 4,
        "resolution": 4891.96981024998,
        "scale": 18489297.737236
      },
      {
        "level": 5,
        "resolution": 2445.98490512499,
        "scale": 9244648.868618
      },
      {
        "level": 6,
        "resolution": 1222.9924525624947,
        "scale": 4622324.434309
      },
      {
        "level": 7,
        "resolution": 611.4962262813797,
        "scale": 2311162.217155
      },
      {
        "level": 8,
        "resolution": 305.74811314055756,
        "scale": 1155581.108577
      },
      {
        "level": 9,
        "resolution": 152.87405657041106,
        "scale": 577790.554289
      },
      {
        "level": 10,
        "resolution": 76.43702828507323,
        "scale": 288895.277144
      },
      {
        "level": 11,
        "resolution": 38.21851414253662,
        "scale": 144447.638572
      },
      {
        "level": 12,
        "resolution": 19.10925707126831,
        "scale": 72223.819286
      },
      {
        "level": 13,
        "resolution": 9.554628535634157,
        "scale": 36111.909643
      },
      {
        "level": 14,
        "resolution": 4.77731426794937,
        "scale": 18055.954822
      },
      {
        "level": 15,
        "resolution": 2.388657133974685,
        "scale": 9027.977411
      },
      {
        "level": 16,
        "resolution": 1.1943285668550505,
        "scale": 4513.988705
      },
      {
        "level": 17,
        "resolution": 0.5971642835598172,
        "scale": 2256.994353
      },
      {
        "level": 18,
        "resolution": 0.29858214164761665,
        "scale": 1128.497176
      },
      {
        "level": 19,
        "resolution": 0.14929107082380833,
        "scale": 564.248588
      },
      {
        "level": 20,
        "resolution": 0.07464553541190416,
        "scale": 282.124294
      },
      {
        "level": 21,
        "resolution": 0.03732276770595208,
        "scale": 141.062147
      },
      {
        "level": 22,
        "resolution": 0.01866138385297604,
        "scale": 70.5310735
      },
      {
        "level": 23,
        "resolution": 0.009330691929342804,
        "scale": 35.265536760789715
      }
    ]
  },
  "resourceInfo": {
    "styleVersion": 8,
    "tileCompression": "gzip",
    "cacheInfo": {
      "storageInfo": {
        "packetSize": 128,
        "storageFormat": "compactV2"
      }
    }
  }
}

The tile URL template is:

The style resources location is:

Derive the style URL from this portion of the vector tile service properties:
                                                                                                                                                                                                   
{
  "currentVersion": 10.81,
  "name": "Santa_Monica_Mountains_Parcels_Styled_VTL",
  "capabilities": "TilesOnly,Tilemap",
  "type": "indexedVector",
  "serviceItemId": "673628c8a10d478a9dd7ded29cfc7df3",
  "publishJobId": "964788ec-9bff-46ca-97d6-c3770d64eb05",
  "jobServiceId": "8c6a6b0d-b219-445e-88c7-3e8d8fe8adc8",
  "ownerUserName": "",
  "serviceDescription": "",
  "description": "",
  "isEnabled": true,
  "id": 278,
  "sourceServiceName": "Santa_Monica_Mountains_Parcels_Styled",
  "sourceServiceType": "FeatureServer",
  "tileContainerName": "cd6d5a4928e843a987875ba5c4de1faf",
  "creationDate": 1607983405530,
  "datasource": "db",
  "tileMap": "tilemap",
  "defaultStyles": "resources/styles",
  "tiles": [
    "tile/{z}/{y}/{x}.pbf"
  ],
  "exportTilesAllowed": false,
  "initialExtent": {
    "xmin": -13240863.776,
    "ymin": 4023715.140299998,
    "xmax": -13173870.3567,
    "ymax": 4054853.8936000015,
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    }
  },
  "fullExtent": {
    "xmin": -13240863.776,
    "ymin": 4023715.140299998,
    "xmax": -13173870.3567,
    "ymax": 4054853.8936000015,
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    }
  },
  "minScale": 295828763.795777,
  "maxScale": 564.248588,
  "maxZoom": 19,
  "tileInfo": {
    "rows": 512,
    "cols": 512,
    "dpi": 96,
    "preciseDpi": 96,
    "format": "indexedVector",
    "origin": {
      "x": -20037508.342787,
      "y": 20037508.342787
    },
    "spatialReference": {
      "wkid": 102100,
      "latestWkid": 3857
    },
    "lods": [
      {
        "level": 0,
        "resolution": 78271.51696399994,
        "scale": 295828763.795777
      },
      {
        "level": 1,
        "resolution": 39135.7584820001,
        "scale": 147914381.897889
      },
      {
        "level": 2,
        "resolution": 19567.87924099992,
        "scale": 73957190.948944
      },
      {
        "level": 3,
        "resolution": 9783.93962049996,
        "scale": 36978595.474472
      },
      {
        "level": 4,
        "resolution": 4891.96981024998,
        "scale": 18489297.737236
      },
      {
        "level": 5,
        "resolution": 2445.98490512499,
        "scale": 9244648.868618
      },
      {
        "level": 6,
        "resolution": 1222.9924525624947,
        "scale": 4622324.434309
      },
      {
        "level": 7,
        "resolution": 611.4962262813797,
        "scale": 2311162.217155
      },
      {
        "level": 8,
        "resolution": 305.74811314055756,
        "scale": 1155581.108577
      },
      {
        "level": 9,
        "resolution": 152.87405657041106,
        "scale": 577790.554289
      },
      {
        "level": 10,
        "resolution": 76.43702828507323,
        "scale": 288895.277144
      },
      {
        "level": 11,
        "resolution": 38.21851414253662,
        "scale": 144447.638572
      },
      {
        "level": 12,
        "resolution": 19.10925707126831,
        "scale": 72223.819286
      },
      {
        "level": 13,
        "resolution": 9.554628535634157,
        "scale": 36111.909643
      },
      {
        "level": 14,
        "resolution": 4.77731426794937,
        "scale": 18055.954822
      },
      {
        "level": 15,
        "resolution": 2.388657133974685,
        "scale": 9027.977411
      },
      {
        "level": 16,
        "resolution": 1.1943285668550505,
        "scale": 4513.988705
      },
      {
        "level": 17,
        "resolution": 0.5971642835598172,
        "scale": 2256.994353
      },
      {
        "level": 18,
        "resolution": 0.29858214164761665,
        "scale": 1128.497176
      },
      {
        "level": 19,
        "resolution": 0.14929107082380833,
        "scale": 564.248588
      },
      {
        "level": 20,
        "resolution": 0.07464553541190416,
        "scale": 282.124294
      },
      {
        "level": 21,
        "resolution": 0.03732276770595208,
        "scale": 141.062147
      },
      {
        "level": 22,
        "resolution": 0.01866138385297604,
        "scale": 70.5310735
      },
      {
        "level": 23,
        "resolution": 0.009330691929342804,
        "scale": 35.265536760789715
      }
    ]
  },
  "resourceInfo": {
    "styleVersion": 8,
    "tileCompression": "gzip",
    "cacheInfo": {
      "storageInfo": {
        "packetSize": 128,
        "storageFormat": "compactV2"
      }
    }
  }
}

The style is named root.json, so can be accessed by appending resources/styles/root.json to the vector tile service URL:

The style is shown below:

{
  "version": 8,
  "sprite": "../sprites/sprite",
  "glyphs": "../fonts/{fontstack}/{range}.pbf",
  "sources": {
    "esri": {
      "type": "vector",
      "url": "../../"
    }
  },
  "layers": [
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Residential",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        0
      ],
      "layout": {},
      "paint": {
        "fill-color": "#FC921F",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Commercial",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        1
      ],
      "layout": {},
      "paint": {
        "fill-color": "#5C5C5C",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Government",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        2
      ],
      "layout": {},
      "paint": {
        "fill-color": "#FFDE3E",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Industrial",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        3
      ],
      "layout": {},
      "paint": {
        "fill-color": "#00C5FF",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Institutional",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        4
      ],
      "layout": {},
      "paint": {
        "fill-color": "#149ECE",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Irrigated Farm",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        5
      ],
      "layout": {},
      "paint": {
        "fill-color": "#A7C636",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Recreational",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        6
      ],
      "layout": {},
      "paint": {
        "fill-color": "#F789D8",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Miscellaneous",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        7
      ],
      "layout": {},
      "paint": {
        "fill-color": "#B7814A",
        "fill-outline-color": "#1A1A1A"
      }
    },
    {
      "id": "Santa_Monica_Mountains_Parcels_Styled/Other",
      "type": "fill",
      "source": "esri",
      "source-layer": "Santa_Monica_Mountains_Parcels_Styled",
      "filter": [
        "==",
        "_symbol",
        8
      ],
      "layout": {},
      "paint": {
        "fill-color": "#AAAAAA",
        "fill-outline-color": "rgba(153,153,153,0.25)"
      }
    }
  ]
}

Authentication

This service requires authentication using either:

  • API key: Allows access to location services using a permanent token that can be restricted to specific services and included in public applications.
  • ArcGIS Identity (OAuth 2.0): Uses OAuth 2.0 protocol to authenticate app users with their ArcGIS Online or Enterprise Identity. The resulting token is used to access the service.

Tutorials

To learn how to create and work with vector tile services that are hosted in the ArcGIS Platform, try the following tutorials that use data management tools and APIs.