martin icon indicating copy to clipboard operation
martin copied to clipboard

Add file extension to individual tile URL

Open ohrie opened this issue 1 year ago • 0 comments

My problem is, that I want to add a Cache-Control HTTP Header in my nginx proxy, because martin currently not yet (#749 ) supports the header. To select the tiles properly, nginx selects (analogous to Apache) the files via file extension (see example). As GDAL writes in their docs: "typical extensions are .pbf, .mvt, .mvt.gz)" for Vector Tiles. Therefore I would propose to add the file extensions for the individual tiles and change the url in the TileJSON.

Therefore the TileJSON would look like this:

{
"tilejson":"3.0.0",
"tiles":["https://tileserver.com/streets/{z}/{x}/{y}.pbf"],
....
}

instead of "https://tileserver.com/streets/{z}/{x}/{y}"

Mapbox specifies in their vector-tile-spec the file extension as .mvt.

ohrie avatar Feb 22 '24 09:02 ohrie