mapbox-gl-js throws an error if a layer does not have a type. However, type is optional in the spec, and ref is not mentioned in the spec (was apparently taken out at some point). Can somebody clarify this? Should type be required then for the layer in the spec? Or something else?
2
votes
1 Answers
4
votes
I believe the documentation is out of date. type
should not be optional
now that ref
has been deprecated. type
should be required.
The style spec docs read:
type
Optional enum. One of"fill"
,"line"
,"symbol"
,"circle"
,"heatmap"
,"fill-extrusion"
,"raster"
,"background"
.