-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make .mbtiles compatible with Mapbox upload #8
Comments
I wonder, might Mapbox be expecting compressed vector tiles instead of plain ones with their mbtiles uploader? Mapbox GL JS wants uncompressed, but Mapbox Studio needs compressed. You might want to contact their support. |
Thanks for clarification. There is an issue on mapbox/mapbox-studio-classic#1076 . It would be nice to have an option to activate/deactivate compression in tilemaker. I think the issue can be closed. |
We actually have compression/decompression code in the tilemaker codebase, so it should be pretty easy to add. I'll change the title to make it clear that an enhancement is required. |
Although optional compression is a good enhancement, it might not be the cause of the mapbox.com incompatibility. It's just one likely cause, and you want compressed for uploading anyways. |
@Maltretieren Do you have an example file that works with the Mapbox upload, so I can disassemble and compare? |
@systemed You can download the file from geofabrik (http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf) and produce the mbtiles file with following command: "tilemaker liechtenstein-latest.osm.pbf --output=liechtenstein.mbtiles" |
Yes - sorry, I wasn't clear: I was wondering if you had an example of a file not produced by tilemaker and which does work with the Mapbox upload. |
Didn't read carefully ;) https://github.com/b-g/tilehut/blob/master/data/tiles-world-vector.mbtiles works... |
Thanks! Ok, there appear to be a couple of issues with Mapbox upload.
|
I suggest focusing on matching the published specs, then raise any incompatibility issues on the Mapbox end. Trying to reverse engineer their code in preference to the specs is an exercise in frustration. |
I've pushed an update which should permit Mapbox-compatible .mbtiles to be created. Three changes:
I considered adding direct support for the vector_tiles value, but given that this appears to be specific to Mapbox's implementation rather than part of any standard, decided that a "bring your own metadata" approach was better. I've tested it by uploading it to Mapbox.com, which seems to accept it happily. I've not proceeded any further because I couldn't instantly see how to get at it via Mapbox Studio's UI, but any further comments/suggestions are very welcome. |
I converted a *.osm.pbf file (http://download.geofabrik.de/europe/liechtenstein-latest.osm.pbf) to mbtiles with tilemaker, default config+lua (tilemaker liechtenstein-latest.osm.pbf --output=lichtenstein.mbtiles). When I try to upload to mapbox.com I get an error "unknown format" by mapbox. Does it need a special config to be compatible with mapbox?
The text was updated successfully, but these errors were encountered: