maptiler/tileserver-php

JSON metadata file is not valid error with mbtiles file

pitommasi opened this issue · 3 comments

I am trying to serve tiles from a mbtiles created with tippecanoe, projection EPSG:3857.

I have uploaded tileserver.php and the mbtiles file in the same folder but I am getting the error.
To be noted that the mbtiles is shown correctly in MapTiler.

On the other end, if instead of the mbtiles, I extract the tiles from it with mb-util and upload the resulting folder, the tileserver.php works - no JSON metadata error - but the tiles are not loaded.
In order to debug, I've copy pasted the code that it gives for Openlayers (I need the tiles to work with OL3) and I manage to see that it fails here:

data['vector_layers'].forEach(function(el) {

because data['vector_layers'] is undefined...

any thought?

Can you upload here data which brakes the server? (or small testing part)

I am not sure I am supposed to... what should I look for? I am currently having a look at it with DB Browser for SQLite...

OK, so, found the problem: there were some double quotes that rendered the json metadata inside the mbtiles invalid. Now I fixed the problem of the alert but the tiles do not show and I only get a black layer - same thing that happened with the pbf extracted with mb-util: could it be due to the projection? I really need the 3857, though, so re-projecting is out of discussion...
Also, should I open a new issue?