To generate an MBTiles file with PNG image map tiles from the Humanitarian Data Model style, follow this steps (on Mac OS X).
Use this workflow to generate a vector tile based map in Mapbox Studio from an osm.pbf
file. https://gist.github.com/aaronpdennis/a53f9afb8ef24d499e96
Install tl.
npm install tl mbtiles tilelive-http tilelive tilejson
Generate a MBTiles file using the hdm-style.tm2
from Part 1. Adjust your bounding box -b
(WSEN), min zoom -z
, and max zoom -Z
to your area.
tl copy
-z 6 -Z 8 -b "-124.4096 32.5343 -114.1308 42.0095" \
tmstyle://./hdm-style.tm2/ mbtiles://./tiles.mbtiles
This will output an MBTiles file that contains static PNG map tiles. You can upload this MBTiles file to Mapbox's hosting services at https://www.mapbox.com/uploads/.