MapsplatformoperationId tiles_json
GET/v1/tiles.json
The TileJSON 3.0 document for the basemap: the tile URL template, the zoom range, the bounds and the attribution.
Point any TileJSON-aware client at this. The tile URL is built from the request's own host, so it is right behind a proxy without configuration. Part of the platform product.
Send Authorization: Bearer sk_live_…. The key's plan must include theplatform product; which plans do.
Explained in Vector tiles and A commute-time map.
Example
The TileJSON document.
curl "https://api.oslew.com/v1/tiles.json" \
-H "Authorization: Bearer $GEO_API_KEY"from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.tiles_json()import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.tiles_json();HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 292
ratelimit-reset: 1
{
"attribution": "© OpenStreetMap contributors (ODbL) · Overture Maps Foundation",
"bounds": [
-99.35,
19.2,
-98.95,
19.6
],
"center": [
-99.15,
19.4,
10
],
"description": "A basemap from open data: Overture Maps (transportation, base, buildings, divisions, addresses) and the store's places and transit stops.",
"format": "pbf",
"maxzoom": 14,
"minzoom": 0,
"name": "basemap",
"scheme": "xyz",
"tilejson": "3.0.0",
"tiles": [
"http://127.0.0.1:18481/v1/tiles/{z}/{x}/{y}.mvt"
],
"tiles_stored": 547,
"vector_layers": [
{
"fields": {
"class": "String",
"name": "String",
"subclass": "String"
},
"id": "water",
"maxzoom": 14,
"minzoom": 0
},
{
"fields": {
"class": "String",
"name": "String",
"subclass": "String"
},
"id": "waterway",
"maxzoom": 14,
"minzoom": 8
},
{
"fields": {
"class": "String",
"subclass": "String"
},
"id": "landcover",
"maxzoom": 14,
"minzoom": 0
},
{
"fields": {
"class": "String",
"name": "String",
"subclass": "String"
},
"id": "landuse",
"maxzoom": 14,
"minzoom": 6
},
{
"fields": {
"class": "String",
"name": "String",
"subclass": "String"
},
"id": "natural",
"maxzoom": 14,
"minzoom": 10
},
{
"fields": {
"class": "String",
"height": "Number",
"name": "String",
"subclass": "String"
},
"id": "infrastructure",
"maxzoom": 14,
"minzoom": 9
},
{
"fields": {
"height": "Number",
"min_height": "Number",
"part": "Boolean"
},
"id": "building",
"maxzoom": 14,
"minzoom": 14
},
{
"fields": {
"class": "String",
"rank": "Number",
"subclass": "String",
"subtype": "String"
},
"id": "transportation",
"maxzoom": 14,
"minzoom": 4
},
{
"fields": {
"class": "String",
"name": "String",
"subtype": "String"
},
"id": "transportation_name",
"maxzoom": 14,
"minzoom": 12
},
{
"fields": {
"admin_level": "Number",
"class": "String",
"maritime": "Boolean"
},
"id": "boundary",
"maxzoom": 14,
"minzoom": 0
},
{
"fields": {
"class": "String",
"name": "String",
"population": "Number",
"rank": "Number"
},
"id": "place",
"maxzoom": 14,
"minzoom": 3
},
{
"fields": {
"class": "String",
"name": "String",
"rank": "Number"
},
"id": "poi",
"maxzoom": 14,
"minzoom": 12
},
{
"fields": {
"class": "String",
"name": "String"
},
"id": "transit",
"maxzoom": 14,
"minzoom": 13
},
{
"fields": {
"housenumber": "String",
"street": "String"
},
"id": "housenumber",
"maxzoom": 14,
"minzoom": 14
}
]
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Responses
200 — TileJSON 3.0.
object
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | No tile archive loaded. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.