tippecanoe icon indicating copy to clipboard operation
tippecanoe copied to clipboard

"JSON metadata file is not valid" when serving mbtiles with tileserver.php

Open fdb opened this issue 4 years ago • 2 comments

I'm trying to serve mbtiles generated with tippecanoe using tileserver-php. The server crashes with a JavaScript alert:

"JSON metadata file is not valid."

I traced it down to the /tilserver/index.json request which returns a JSON file that JavaScript thinks is not proper JSON.

The problem occurs in the generator_options, which looks like this for me:

"generator_options": "tippecanoe --force -o output.mbtiles '--maximum-zoom=16' --drop-densest-as-needed -rg input.geojson",

Removing the single quotes around --maximum-zoom=16 generator_options fixes the issue.

This seems like a duplicate of #459, but there the problem was the json field.

fdb avatar Oct 11 '19 18:10 fdb

Strange I use the last version tippecanoe v1.35.0 and I have the same problem

Here is my json https://gist.github.com/2803media/27e526a182790d407f639149677ff4c1

My command to make the mbtiles file:

tippecanoe -zg -f -o GEO050K-01.mbtiles --drop-densest-as-needed GEO050K_HARM_001_P_DIVERS_2154.json

And get the same error with tileserver-php

But can't find why this fail with this json file

2803media avatar Apr 30 '20 16:04 2803media

same here ....I just downloaded tippecanoe and got exactly the same error....Any help appreciated ....Thank you

fre391 avatar Oct 21 '21 16:10 fre391