NDS.Live

getLayerByTileId

Request access

Returns the full smart layer tile for a tile ID, with every layer the service holds for that tile.

Request data

HTTP method: POST

URL request format
https://{serviceURL}/getLayerByTileId?apiKey={Your_API_Key}

Request body

The body is a zserio-encoded TileId object.

HTTP request headers

HeaderDescription
Content-Typeapplication/x-zserio-object, the zserio media type.
If-None-MatchOptional. The entity tag for conditional requests.

Conditional requests

To send a conditional request:

  1. Store the entity tag from the ETag response header, quotation marks included.
  2. On the next request for the same resource, send it in If-None-Match.
  3. If nothing changed, the service returns 304 with an empty body, and you keep using your cached copy. For a method that redirects to a file, the service answers 304 itself, without redirecting.

Send the entity tag in If-None-Match, not in an ETag request header. The ETag request header is deprecated.

Response data

Response body

TomTom’s Smart Layer Tile Service answers with 303 See Other. The Location response header points to a file on a TomTom content delivery network, which holds the tile. Make sure your HTTP client follows redirects. Most clients do this by default. The Location URL carries a short-lived access token, so don’t cache it or write it to logs.

The file is a zserio-encoded SmartLayerTile object.

HTTP response headers

HeaderDescription
LocationThe URL of the file that holds the tile.
ETagThe entity tag of the tile, for conditional requests.

HTTP status codes

Besides the codes below, any method can return the common errors, for example 401 for a missing API key.

CodeMeaning
200OK. The response body holds the SmartLayerTile.
204The tile is empty, outside the area your product covers, or at a level the service doesn’t serve. Cache an empty result and don’t retry.
303See other. The tile is at the URL in the Location response header. TomTom’s service usually answers with this code.
304Not modified since the version identified in If-None-Match.
404Not found. The tile is outside the service’s spatial extent.
410Gone. The Smart Layer Tile Service is decommissioned. Ask the NDS.Live Registry for another service.
500Internal server error.