Closed thisisaaronland closed 3 years ago
@thisisaaronland the MBTiles you've created only has zoom levels 12-14. IS this how you expect to use the tileset in the final product? Right now PMTiles assumes a complete pyramid (every tile that exists at Z+1 has a parent tile at Z in the tileset).
In any case, I think it won't be too hard to make the tool work with limited zoom tile sets. Looking into it now.
@thisisaaronland can you try python pmtiles version 0.0.6? Previously assumed at least one tile exists in the root directory, it now can be empty.
I can confirm that v0.0.6 does the right thing:
$> pmtiles-convert norcal-latest.mbtiles norcal-latest.pmtiles
Num tiles: 92300
Num unique tiles: 92241
Num leaves: 12
I was unaware that the MBTiles file was only Z12-14. I guess I missed something in the tilemaker
documentation which would explain why when I load the norcal-latest.pmtiles
with the example app in the go-http-protomaps package there is no map.
$> ./bin/example -protomaps-tile-url file:///usr/local/data/osm/norcal-latest.pmtiles
2021/05/19 11:27:05 Listening for requests on http://localhost:8080
Curiously, though when I zoom in to Z12-14 I see stuff like this:
I will try rebuilding the MBTiles database again and see if that fixes things. In the meantime is there an extra step necessary to ensure styling information is applied to a .pmtiles
database?
That looks like there isn't any styling being applied to the data layers in the vector tileset. That information is defined as parameters to the LeafletLayer, or by default it uses this here (analogous to Tangram YAML or MapboxGL JSON styles):
https://github.com/protomaps/protomaps.js/blob/master/src/default_style/style.ts#L38
The default styles are specific to the layers and organization of features from protomaps.com , so those will need to be adapted to the specific tileset you are using which almost certainly has differently named and organized layers.
Before I start poking around in earnest I wanted to see whether this error was a "known-known" or otherwise something that you'd recognized faster than me.
The error is triggered by running a
pmtiles-convert
on a MBTiles database derived from the Geofabrik downloads, usingtilemaker
.