Sorry, you need to enable JavaScript to visit this website.

Raster Traffic Incident Tiles

 

Service version: 4
Last edit: 2019.02.21

On this page

Purpose

The TomTom Traffic Tile service serves 256 x 256 pixel tiles showing traffic incidents.

  • All tiles use the same grid system.
  • Because the traffic tiles use transparent images, they can be layered on top of map tiles to create a compound display.
  • Traffic tiles render graphics to indicate traffic on the roads in the specified area.

For example:

256 x 256 pixel tile

Run this endpoint

You can easily run this and other endpoints.

  1. Go to the TomTom API Explorer page.
  2. Click an endpoint.
    1. Click Try it out.
    2. Enter/select all required parameter values and any optional parameter values.
    3. At the bottom of the form, click Execute.
  3. Review the Response.

Request data

HTTPS method: GET

URL format

For ease of viewing and identification:

  • Required constants and parameters are shown in bold text.
  • Optional parameters are shown in plain text.
https://baseURL/traffic/map/versionNumber/tile/incidents/style/zoom/x/y.format?key=*****&t=t

Example:

https://api.tomtom.com/traffic/map/4/tile/incidents/s3/12/2044/1360.png?key=*****

curl command

curl -XGET
'https://api.tomtom.com/traffic/map/4/tile/incidents/s3/12/2044/1360.png?key=*****'

Request parameters

The following table describes the parameters that can be used in a Request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.
  • If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
Required parameters
Parameter Description
baseURL
string
The base URL for calling TomTom services.
Value: api.tomtom.com
versionNumber
string
The version of the service to call.
Value: The current value is 4.
style
string
The style to be used to render the tile.

  • s1 creates traffic lines with colored chevrons indicating severity.
  • s2 and s3 create plain lines with different degrees of glow.

Values:

  • s1
  • s2
  • s3
  • night
zoom
integer
The zoom level of the tile to be rendered.
Value: 0..22
x
integer
The x coordinate of the tile on the zoom grid.
Value: 0..2 zoom -1
y
integer
The y coordinate of the tile on the zoom grid.
Value: 0..2 zoom -1
apiKey
string
An API Key valid for the requested service.
Value: Your valid API Key.
format
string
The format of the Response.
Value:

  • png
  • gif
Optional parameters
Parameter Description
t
string
The reference value for the state of traffic at a particular time, obtained from the Viewport API call.

  • It is updated every minute, and is valid for two minutes before it times out.
  • Use -1 to get the most recent traffic information.
  • This defaults to the most recent traffic information.

Default value: -1

▲ Return to top

Response data

HTTP Response codes

Code Meaning and Possible Causes
200 OK
400 Bad request, usually due to a malformed syntax.

  • Zoom n is out of range 0 <= zoom < 19: The requested zoom level is out of the possible range.
  • x n is out of range [0,m]: The requested x coordinate is out of the possible range (the value of m will vary depending on zoom level).
  • y n is out of range [0,m]: The requested y coordinate is out of the possible range (the value of m will vary depending on zoom level).
  • Unknown Content Type: nnn: The requested content type is not supported.
403 Forbidden: The supplied API Key is not valid for this Request.
500 Internal Server Error

▲ Return to top