Vector Tiles
Request accessPurpose
The Vector Tiles endpoint provides information about the probability of finding available on-street parking locations, together with their geometry. It also provides data on zoom levels ranging from 0 to 22.
- For zoom level
0, the world is displayed on a single tile. - At zoom level
22, the world is divided into 244 tiles. See the Zoom Levels and Tile Grid .
The Vector Tiles endpoint delivers on-street parking data packaged in a vector representation of squared sections called vector tiles. Each tile includes a pre-defined collection of fragments of road shapes with on-street parking data (parking locations). The format of the tile is formally described using the protobuf schema .
Tiles resolution
On-street parking geometry is stored as coordinates in the range of 0-4095. Coordinates (0,0) define the top-left corner of the tile.
Vector format
The Vector format is a binary format created by using Google Protocol Buffers to serialize the data according to this defined vector schema .
- The data is mapped to a protobuf layer called “On-street parking”.
- Besides the protobuf layers, the protobuf tags are also used to further describe the on-street parking.
- The protobuf tags are split into two categories: default and on-demand.
- The default tags are used unless they are filtered out by the
tagsrequest parameter. - The on-demand tags are used only if they were added by the
tagsrequest parameter.
- The default tags are used unless they are filtered out by the
On-street parking tags
Default tags | Description |
|---|---|
float | It is a probability of finding an available on-street parking location. If the probability is missing in a particular parking location, it means that we have the geometry of this parking location, but currently we don’t have any probability associated with it. Values: |
On-demand tags | Description |
|---|---|
string | This is a parking location ID, coming directly from our parking data provider, and is used to combine data from different sources. Value: A parking location ID. |
Request data
HTTPS Method: GET
- Constants and parameters enclosed in curly brackets
{}must be replaced with their values. - See the following Request parameters section with the required and optional parameters tables for these values.
URL format
https://{baseURL}/maps/orbis/on-street-parking/tile/{zoom}/{x}/{y}.{format}?apiVersion=1&key={Your_API_Key}&tags=[{tag1,tag2,...}]URL example
https://api.tomtom.com/maps/orbis/on-street-parking/tile/5/4/8.pbf?apiVersion=1&key={Your_API_Key}&tags=[id,probability]curl command example
curl 'https://api.tomtom.com/maps/orbis/on-street-parking/1/tile/5/4/8.pbf?apiVersion=1&key={Your_API_Key}&tags=[id,probability]'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.
Required parameters | Description |
|---|---|
string | Base URL for calling the API. Value: api.tomtom.com |
string | The authorization key for access to the API. Value: Your valid |
integer | The zoom level of a tile to be rendered. The actual data is going to appear starting from the Value: |
integer | The x coordinate of a tile on the zoom grid. Value:
|
integer | The y coordinate of a tile on the zoom grid. Value:
|
string | The format of the response. Value: pbf ( Protocolbuffer Binary Format ) |
Optional parameters | Description |
|---|---|
| A version of the API to call. If the parameter is set, it will overwrite the value stored in TomTom-Api-Version header.
Value: The current version is |
string | The list of the values representing the available tags in the tile:
If this parameter is not present default tags are used. See the
Vector format
for details. The list of the values must be enclosed in square brackets
Value: Square brackets enclosed list. |
Request headers
The following data table lists HTTP request headers of particular interest to clients of the Parking Locations endpoint. Note: There are no required headers in this endpoint.
Required headers | Description |
|---|---|
TomTom-Api-Version integer | Contains a version of the API to call.
Value: The current version is |
Optional headers | Description |
|---|---|
Contains the content encoding (usually a compression algorithm), that the client is able to understand. Value: | |
Contains an identifier for a specific version of resource. The server will send back the requested resource, with a 200 HTTP status code, only if it doesn’t have an ETag matching the given one. Value: | |
| Tracking-ID | Specifies an identifier for the request. It can be used to trace a call.
The value must match the regular expression
Value: |
Response data
Successful response
- The Vector Tiles endpoint, for a valid single request, returns a binary response body which must be deserialized by client code generated by the Google Protocol Buffers compiler.
- The data that appear in a response depend on a value of the {tags} request parameter.
The following examples use a simple textual representation of the serialized binary vector tile data to illustrate the response content.
Response example
layer: 0 name: On-street parking version: 2 extent: 4096 keys: 0: probability values: 0: 0.63 [double] 1: 0.5 2: 0.6 3: 0.62 feature: 0 id: (none) geomtype: linestring geometry: LINESTRING[count=3](-292 1382,-286 1478,-278 1552) properties: probability=0.63 [double] feature: 1 id: (none) geomtype: linestring geometry: LINESTRING[count=2](-312 1192,-320 1104) properties: probability=0.5 [double] feature: 2 id: (none) geomtype: linestring geometry: LINESTRING[count=3](-320 1100,-330 1012,-334 954) properties: probability=0.6 [double] feature: 3 id: (none) geomtype: linestring geometry: LINESTRING[count=2](-324 1060,-312 1178) properties: probability=0.62 [double]Error response
The Vector Tiles endpoint, for an invalid single request, returns a response body in JSON format.
Response field structure
Field | Description |
|---|---|
object | Main |
string | One of a server-defined set of error codes. |
string | A human-readable description of the error code. |
Response example
{ "detailedError": { "code": "INVALID_REQUEST", "message": "Unsupported tile format. Allowed format is pbf." }}HTTP response codes
Code | Meaning & possible causes |
|---|---|
| OK |
| Not modified |
| Bad request |
| Forbidden: The supplied API Key is not valid for this request. |
| Method Not Allowed: The provided HTTP request method is known by the server, but is not supported by the target resource. |
| Too Many requests: Too many requests were sent in a given amount of time for the supplied API Key. |
| Internal Server Error |
| Service currently unavailable: The service is currently unavailable. |
| Service Not Found: Unknown version of the service. |
HTTP response headers
The following data table contains response headers sent back from an API server.
Header | Description |
|---|---|
Indicates that cross-origin resource sharing (CORS) is allowed. Value: | |
Lists the set of supported HTTP methods. The header is sent in case a
Value: | |
Indicates which encodings were applied to the response body. Value: | |
Contains information about the size of the response body. Value: | |
Indicates the media type of the resource returned. Value: | |
Contains the date and time at which the message was originated. For
details check
RFC 7231 . | |
Contains an identifier for a specific version of resource. Value: | |
| Tracking-ID | An identifier for the request. If the Tracking-ID header was specified in the request, it is replicated in the response. Otherwise, it is generated automatically by the service. For details check RFC 4122 . It is only meant to be used for support and does not involve tracking of you or your users in any form. Value: |