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 Maps SDKs for Native Apps do not currently support vector tiles in scenes.
Key features
- Securely store vector tiles in ArcGIS.
- 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:
- Creating a vector tile service using data managament tools.
- Accessing the style definition and style resources for the vector tile service.
- 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
Vector tile services only support an enhanced endpoint. To access a vector tile service, use the host, unique service ID, and service name.
For example:
Learn more about standard and enhanced endpoints in Service endpoints.
Required parameters
f
The format of the query response:
json
pjson
geojson
html
pbf
ArcGIS client APIs use json
(or pbf
when displaying content in a map view or scene view). Many open source APIs use geojson
.
To see which formats are supported for a particular feature layer, see the supports
property of the feature layer.
token
The access token used to access restricted operations or private content. The value can be an API Key or OAuth 2.0 token.
Vector tile style URL
To access a vector tile service style, use the host, unique service ID, and service name, and read the default
property of the vector tile service. This is usually resources/styles
. The style json can be found at resource/styles/root.json
.
For example:
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.
For example:
Code 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.
The tile URL template is:
The style resources location is:
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:
Authentication
To make authenticated requests you need to use one of the following:
- API key: A permanent token that grants your application access to ready-to-use services and, with an ArcGIS Developer account, private content (currently in beta).
- ArcGIS Identity (formerly named user): Grants a short-lived token, generated via OAuth 2.0, giving your application permission to access the content and services authorized to an existing ArcGIS user's account.
- Application credential: Grant a short-lived token, generated via OAuth 2.0, authorizing your application access to ready-to-use services. See usage restrictions.
Learn more about getting access tokens in Security and authentication.
API support
- 1. Access portal via HTTP request and authentication.
- 2. Access via ArcGIS REST JS.
- 3. Requires manual application of renderers
Pricing
To determine how much it costs to access the service:
- If you have an ArcGIS Developer account, go to Pricing. Transactions are billed in US dollars. A free tier of transactions may be available.
- If you have an ArcGIS Online account, go to Understand credits. Transactions are billed in credits.
Tutorials
To learn how to create and work with vector tile services that are hosted in ArcGIS, try the following tutorials that use data management tools and APIs.