> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/ja/data/tilesets/llms.txt)

# Mapbox Traffic v1

This tileset reference document includes information to help you use the data in the Mapbox Traffic v1 tileset.

## Overview

**Mapbox Traffic v1** is a Mapbox-provided vector tileset that you can use to display real-time traffic conditions on a map. The tileset provides constantly updating congestion information on top of [Mapbox Streets](https://www.mapbox.com/maps/streets/) road geometries.

### Access this Tileset

Use this **Tileset URL** to add this tileset to your map style as a `vector` source:

```text
mapbox://mapbox.mapbox-traffic-v1
```

Access this tileset's [TileJSON](https://docs.mapbox.com/help/ja/glossary/tilejson/):

```text
https://api.mapbox.com/v4/mapbox.mapbox-traffic-v1.json?access_token=YOUR_MAPBOX_ACCESS_TOKEN
```

Access tiles from this tileset via the [Vector Tiles API](https://docs.mapbox.com/api/ja/maps/vector-tiles/) using the following template:

```text
https://api.mapbox.com/v4/mapbox.mapbox-traffic-v1/{z}/{x}/{y}.{format}?access_token=YOUR_MAPBOX_ACCESS_TOKEN
```

Query this tileset at a specific location using the [Tilequery API](https://docs.mapbox.com/api/ja/maps/tilequery/):

```text
https://api.mapbox.com/v4/mapbox.mapbox-traffic-v1/tilequery/{longitude},{latitude}.json?access_token=YOUR_MAPBOX_ACCESS_TOKEN
```

### Line offsets

You can use Mapbox Traffic to display congestion for both directions on two way roads. When styling congestion, it's recommended that you add a positive `line-offset` to the layer to visually separate the directions of travel.

In regions that use left-hand traffic, road directions are reversed to allow for consistent `line-offset` styling of all roads.

### Data sources

The Mapbox Traffic tileset is built from de-identified sensor data. Mapbox SDKs continuously collect de-identified data about the map and device location to update and improve our maps and services. To learn more about the telemetry data that goes into the Mapbox Traffic tileset, visit [our telemetry page](https://www.mapbox.com/telemetry/).

### Data updates

Mapbox Traffic receives two different types of data updates:

-   Traffic speeds and densities, used to derive congestion, are updated approximately every 8 minutes.
-   Road geometries, based on OpenStreetMap, are periodically updated.

### Attribution

You must [display proper attribution](https://docs.mapbox.com/help/dive-deeper/attribution/) in styles or software that use Mapbox Traffic vector tiles.

## Layer reference

### `#traffic`

buffer: 4

#### Classes

The main field used for styling traffic layers is **`class`**.

| Value | Description |
| --- | --- |
| `motorway` | High-speed, grade-separated highways |
| `motorway_link` | Interchanges / on & off ramps |
| `trunk` | Important roads that are not motorways. |
| `trunk_link` | Ramps and physically separated at-grade turning lanes connecting trunks to other roads. |
| `primary` | A major highway linking large towns. |
| `primary_link` | Ramps and physically separated at-grade turning lanes connecting primary roads to other roads. |
| `secondary` | A highway linking large towns. |
| `tertiary` | A road linking small settlements, or the local centers of a large town or city. |
| `link` | Secondary and tertiary link roads |
| `street` | Standard unclassified, residential, road, and living_street road types |
| `service` | Access roads, alleys, agricultural tracks, and other services roads. Also includes parking lot aisles, public & private driveways. |

#### Structure

The **`structure`** field describes the grade of a road. Bridges and tunnels are not distinct from surface roads until zoom level 13.

| Value | Description |
| --- | --- |
| `bridge` | Roads that lead over a bridge. |
| `tunnel` | Roads that run underground. |
| *no value* | Surface roads and fords. |

#### Congestion

The **`congestion`** field is a measure of the relative slowdown a road segment is experiencing.

| Value |
| --- |
| `low` |
| `moderate` |
| `heavy` |
| `severe` |

#### Road Closures

The **`closed`** field marks roads that are closed.

| Value | Description |
| --- | --- |
| `yes` | Roads that are closed. |
| *no value* | Roads that are open. |