Reputation: 1
I've downloaded .mbtiles files to my computer for offline maps from this link (for research and test purpose, not for commercial use that money has to be paid first):
https://data.maptiler.com/downloads/dataset/osm/#0.22/0/0
and converted it using python code from this link:
https://hackeradam.com/post/dump-mbtiles-python/
The resulted OSM XYZ formatted png map tile files are unfortunately all unsupported, missing Dimensions and Bit depth info when looking at their 'details' property. However, using the same python code for the 'countries-raster.mbtile' file from this link:
https://gitlab.com/IvanSanchez/Leaflet.TileLayer.MBTiles/-/tree/master/demo?ref_type=heads
the converted XYX png map tile images are good and can be used as local XYZ map tile images in Leaflet code to get the desired map as
http://ivansanchez.gitlab.io/Leaflet.TileLayer.MBTiles/demo/demo.html
Question: What could be wrong or different in terms of meta data format for the mbtile files downloaded from the first link ? How can I make them work ? Thanks
Upvotes: 0
Views: 1263
Reputation: 486
With the first link you mentioned you are downloading vector tiles, not raster tiles. If you need raster tiles (png) you would either have to download those or use a software like e.g. tileserver-gl to transform the vector tiles into raster tiles.
Upvotes: 0