mapbox / tilejson-spec

JSON format for describing map tilesets.
255 stars 52 forks source link

Formalise `vector_layers` #29

Closed stevage closed 6 years ago

stevage commented 6 years ago

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.

stevage commented 6 years ago

OIC, duplicate of #14