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
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:
- 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
To access a vector tile service, use the host, unique service ID, and service name.
For example:
Parameters
f
The format (f
) parameter defines how data is returned.
- Use
json
(or omit thef
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
.
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:
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
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.