TileJSON
Configuration for serving TileJSON documents describing configured layers. See that page for a full description of the endpoints, what goes into a document, and how authentication applies, including how a caller's own layer or geographic restrictions carry through to what's returned.
Example
-
YAML
-
JSON
server:
tilejson:
enabled: true
indexpath: tilejson.json
baseurls:
- https://tiles-a.example.com/maps
- https://tiles-b.example.com/maps
{
"server": {
"tilejson": {
"enabled": true,
"indexpath": "tilejson.json",
"baseurls": [
"https://tiles-a.example.com/maps",
"https://tiles-b.example.com/maps"
]
}
}
}
Configuration
| Parameter | Description | Type | Required | Default |
|---|---|---|---|---|
|
If true, serve TileJSON documents for eligible layers |
bool |
No |
false |
|
The HTTP path, relative to RootPath, that serves a TileJSON index listing of eligible layer |
string |
No |
tilejson.json |
|
Controls the base(s) used for the |
string[] |
No |
Built from header inspection |
| Configuration Parameter | Environment Variable |
|---|---|
|
|
|
|
|
|
Layer Metadata Examples
-
YAML
-
JSON
layer:
id: my_layer
description: Aerial imagery from 2023
attribution: "© Example Imagery Co"
datatype: raster
minzoom: 4
maxzoom: 16
bounds:
south: 51
north: 63
west: -7
east: 0.1
provider:
...
{
"layer": {
"id": "my_layer",
"description": "Aerial imagery from 2023",
"attribution": "© Example Imagery Co",
"datatype": "raster",
"minzoom": 4,
"maxzoom": 16,
"bounds": {
"south": 51,
"north": 63,
"west": -7,
"east": 0.1
},
"provider": { ... }
}
}
-
YAML
-
JSON
layer:
id: my_layer
pattern: my_{name}_{version}
paramValidator:
"*": "^[a-zA-Z0-9]+$"
"version": "v[0-9]{1,3}"
examples:
- my_foo_v1
- my_bar_v2
provider:
...
{
"layer": {
"id": "my_layer",
"pattern": "my_{name}_{version}",
"paramValidator": {
"*": "^[a-zA-Z0-9]+$",
"version": "v[0-9]{1,3}"
},
"examples": [
"my_foo_v1",
"my_bar_v2"
],
"provider": { ... }
}
}