Closed thisisaaronland closed 3 years ago
Paging @iandees
I saw you edited out the --inverted-y
option. Did you create the mbtiles with that? I'm guessing the serve option doesn't support it.
Can you post the mbtiles file? Does it contain the tiles you expect to be there?
Well, the 404 problem was a problem passing a lat,lon pair in the ocean. Passing a more-better lat,lon yields 200 responses but the preview.html
page still doesn't render anything...
http://localhost:8080/preview.html#lat=37.7780&lng=-122.4316&z=15
No JS errors in the console, but still just a blank map.
I also don't see anything on the map, but the tiles definitely have data in them (as shown by qgis):
The preview.html is exactly the same modulo whitespace.
Curling a tile from Nextzen and comparing it to the same tile from the mbtiles shows that the mbtiles version is much smaller:
$ ls -l ~/Downloads/11-327-791-*
-rw-r--r-- 1 iandees staff 129854 Jun 2 09:36 /Users/iandees/Downloads/11-327-791-mbtiles.mvt
-rw-r--r-- 1 iandees staff 226216 Jun 2 09:33 /Users/iandees/Downloads/11-327-791-nextzen.mvt
The tile from mbtiles is compressed where the nextzen one comes as uncompressed:
$ file ~/Downloads/11-327-791-mbtiles.mvt
/Users/iandees/Downloads/11-327-791-mbtiles.mvt: gzip compressed data, last modified: Wed Jun 2 13:37:58 2021, max compression, original size modulo 2^32 226216
$ file ~/Downloads/11-327-791-nextzen.mvt
/Users/iandees/Downloads/11-327-791-nextzen.mvt: data
Found a bug in the code related to gzipping data that ends up in mbtiles. PR above fixes it. When you pull down the new code you'll have to re-generate your mbtiles.
I can confirm it all works as expected. Thanks!
I am trying to build an MBTiles database using the
build
tool:And then serving it using the
serve
tool:But when I try to see the tiles in a web browser by visiting:
I just see an empty map and a lot of 404 errors for the individual tiles requests. I feel like I am forgetting to do something obvious here but I am having trouble figuring out what...