mapbox/tilejson-spec

Formalise `vector_layers`

stevage opened this issue · 1 comments

The spec does not currently support any way to describe the layers contained within the tiles. This means that the client has to "somehow know" which layers exist. IMHO this kind of metadata makes a lot of sense to include.

Both Mapbox's API and the tile server Tessera uses the "vector_layers" property for this purpose:

    "vector_layers": [
        {
            "id": "tr_rail",
            "description": "",
            "minzoom": 0,
            "maxzoom": 13,
            "fields": {
                "FTYPE_CODE": "String",
                "NAME": "String",
                "STRUC_TYPE": "String",
                "TOUR_TYPE": "String"
            }
        }
    ]

Mapbox's API includes source and source_name properties on individual layers. (The former for the case where a multiple sources are being combined in one query, I presume).

I'm happy to write this up as a PR if desirable.

OIC, duplicate of #14