1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
use BTreeMap;
use ;
use Value;
/// Each object describes one layer of vector tile data.
///
/// A `vector_layer` object MUST contain the id and fields keys, and MAY contain the description,
/// minzoom, or maxzoom keys. An implementation MAY include arbitrary keys in the object
/// outside of those defined in this specification.
///
/// *Note: When describing a set of raster tiles or other tile format that does not have
/// a "layers" concept (i.e. "format": "jpeg"), the `vector_layers` key is not required.*
///
/// These keys are used to describe the situation where different sets of vector layers
/// appear in different zoom levels of the same set of tiles, for example in a case where
/// a "minor roads" layer is only present at high zoom levels.
///
/// ```json
/// {
/// "vector_layers": [
/// {
/// "id": "roads",
/// "description": "Roads and their attributes",
/// "minzoom": 2,
/// "maxzoom": 16,
/// "fields": {
/// "type": "One of: trunk, primary, secondary",
/// "lanes": "Number",
/// "name": "String",
/// "sidewalks": "Boolean"
/// }
/// },
/// {
/// "id": "countries",
/// "description": "Admin 0 (country) boundaries",
/// "minzoom": 0,
/// "maxzoom": 16,
/// "fields": {
/// "iso": "ISO 3166-1 Alpha-2 code",
/// "name": "English name of the country",
/// "name_ar": "Arabic name of the country"
/// }
/// },
/// {
/// "id": "buildings",
/// "description": "A layer with an empty fields object",
/// "fields": {}
/// }
/// ]
/// }
/// ```
///
/// See <https://github.com/mapbox/tilejson-spec/tree/master/3.0.0#33-vector_layers>