tilegroxy docs
See TileJSON operation for a full description of the endpoints, document structure, and how authentication applies.

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"
      ]
    }
  }
}

Layer Metadata

Layer example
  • 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": { ... }
  }
}
Pattern layer example
  • 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": { ... }
  }
}

Configuration

Configuration options
Parameter Description Type Required Default

Enabled

If true, serve TileJSON documents for eligible layers

bool

No

false

IndexPath

The HTTP path, relative to RootPath, that serves a TileJSON index listing of eligible layers

string

No

tilejson.json

BaseURLs

Controls the base(s) used for the tiles field, instead of building it from the request. Useful if URLs are opaquely rewritten before reaching tilegroxy, or if tiles are served through multiple hosts. Each entry can include scheme, host, and path prefix, and produces one entry in the tiles array.

string[]

No

The request’s scheme and Host, or what a proxy listed in server.forwarded.trusted reported

Environment variables
Configuration Parameter Environment Variable

Enabled

SERVER_TILEJSON_ENABLED

IndexPath

SERVER_TILEJSON_INDEXPATH