-
Notifications
You must be signed in to change notification settings - Fork 267
Description
As documented in #77, mapbox/mbtiles-spec#43, mapbox/mbtiles-spec#46 and mapbox/mbtiles-spec#47, some Mapbox clients require a mysterious json entry in the metadata table which contains further metadata about the tileset.
@ericfischer has done a sterling job of unofficially documenting it in this PR.
I will admit to not being too fond of this - it seems, effectively, to be a bit of a hack (storing json in a sqlite field) in lieu of properly revising the mbtiles spec, and some of it (minzoom/maxzoom levels) is duplicating data contained elsewhere in the .mbtiles file. But we are where we are, and the question is how tilemaker should handle it.
At present the approach is to allow users to manually write the json field out in a metadata hash in their tilemaker .json config, which will then be passed through into the tileset.
In theory (as suggested by @sfkeller in #77) we could probably autogenerate the Mapbox json field, given that we know most of the content. Any such function should be optional as no other client needs this data. So I guess the questions are:
- Is the current functionality good enough?
- Are there people who would genuinely find an autogenerated
vector_layersfield useful? - Will it be obsoleted by any revised mbtiles spec?
- What interface do we implement in tilemaker, and how do we do it efficiently? (In particular, the MVT format does not impose consistent typing on attributes, and tilemaker follows suit; whereas the
vector_layersfield requires consistent typing for any field across a tileset.)
cc @pnorman