Mapbox Traffic v1

Source id:
mapbox.mapbox-traffic-v1

This is a guide to the layers and data inside the Mapbox Traffic vector tile source to help with styling.

The map above uses minimal styling to illustrate the coverage, density, and zoom extents of various source layers in this tileset. Toggle between Map and Style JSON to see the relationship between the visual map and the source data.

Overview

Mapbox Traffic provides constantly updating congestion information on top of Mapbox Streets road geometries.

When you publicly use styles or software that use Mapbox Traffic vector tiles, you must display proper attribution.

Line offsets

Mapbox Traffic can be used 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 updates

Mapbox Traffic receives two different types of data updates:

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

Layer Reference

#traffic

buffer: 4

Classes

The main field used for styling traffic layers is class.

ValueDescription
motorwayHigh-speed, grade-separated highways
motorway_linkInterchanges / on & off ramps
trunkImportant roads that are not motorways.
trunk_linkRamps and physically separated at-grade turning lanes connecting trunks to other roads.
primaryA major highway linking large towns.
primary_linkRamps and physically separated at-grade turning lanes connecting primary roads to other roads.
secondaryA highway linking large towns.
tertiaryA road linking small settlements, or the local centres of a large town or city.
linkSecondary and tertiary link roads
streetStandard unclassified, residential, road, and living_street road types
serviceAccess 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.

ValueDescription
bridgeRoads that lead over a bridge.
tunnelRoads that run underground.
no valueSurface 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.

ValueDescription
yesRoads that are closed.
no valueRoads that are open.