Closed nextstopsun closed 2 years ago
mbtileserver
returns a HTTP 204 when the tile could not be queried from the underlying mbtiles file; other formats generally return HTTP 404 in this case, but doing so for vector tiles tends to produce bad behavior in various clients.
Note that the Y (row) coordinate of the tile request is flipped before querying the mbtiles file here because mbtiles are stored according to the mbtiles spec but served according to XYZ here, so a request for
.../tiles/9/308/159.pbf
would translate into a query of
sqlite> select tile_data from tiles where zoom_level=9 and tile_column=308 and tile_row=352;
Can you please check that query against your mbtiles file to determine if there is indeed a tile present for that zoom / column / row?
You may also want to double-check that your mbtiles file contains files according to the TMS row order according to the mbtiles spec. How did you create your tiles?
@brendan-ward Thanks, TMS schema was the case here.
Fixed with
UPDATE tiles SET tile_row = (1 << zoom_level) - 1 - tile_row;
HTTP/1.1 204 No Content response when requesting an existing pbf tile.
Hosting with docker:
Testing request:
Testing with sqlite
I've double checked and the data is there in the tiles table. Verbose logging doesn't output the actual database query, so I've got no clue why mbtileserver sends no content back.