mapbox / vector-tile-spec

Mapbox Vector Tile specification
https://www.mapbox.com/vector-tiles/specification/
Other
891 stars 210 forks source link

V2 Tiles have a default Layer version of 1 #81

Closed fosskers closed 8 years ago

fosskers commented 8 years ago

As of v2.1 of the spec, the Layer message has the following field:

required uint32 version = 15 [ default = 1 ];

Was this an oversight, or can default values not be changed for required fields? Please forgive my ignorance if its the latter.

jfirebaugh commented 8 years ago

The default value is an advisory to consumers as to how to interpret a message without a version value. It has no effect on tile generation. Semantically, we can't change the default, because there are existing v1 tiles without a version value, which need to continue to be interpreted as v1 tiles. When generating v2 tiles, always include an explicit version value of 2.

fosskers commented 8 years ago

Got it, thanks.