You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The style docs say that the sprite property is required if a layer uses the background-pattern, fill-pattern, fill-extrusion-pattern, line-pattern and icon-image properties. The standalone sprite section of the docs however doesn't mention the fill-extrusion-pattern requirement.
In either case, this is confusing. These properties may be necessary when setting up a map's root style, but at runtime you can use the addImage method to help setup a layer that makes use of the *-pattern and icon-image properties without requiring a sprite URL.
This came up as I was trying to add validation for styles that use the "required" properties without a sprite URL in #6831. A strict test that throws an error turns out to be a breaking change for styles that use these properties in runtime via addImage.
The text was updated successfully, but these errors were encountered:
The docs now mention fill-extrusion-pattern. It also no longer says that the sprite is required ("its icons can be used to render..."). The docs could be better (like all our style-spec docs could be) but these specific issues seem fixed.
The style docs say that the
sprite
property is required if a layer uses thebackground-pattern
,fill-pattern
,fill-extrusion-pattern
,line-pattern
andicon-image
properties. The standalone sprite section of the docs however doesn't mention thefill-extrusion-pattern
requirement.In either case, this is confusing. These properties may be necessary when setting up a map's root style, but at runtime you can use the
addImage
method to help setup a layer that makes use of the*-pattern
andicon-image
properties without requiring a sprite URL.This came up as I was trying to add validation for styles that use the "required" properties without a sprite URL in #6831. A strict test that throws an error turns out to be a breaking change for styles that use these properties in runtime via
addImage
.The text was updated successfully, but these errors were encountered: