mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

Add colorable SDF images for use with a symbol layer directly to the style.json

Open Higuy8000 opened this issue 2 years ago • 0 comments

mapbox-gl-js version:

2.10.0

Question

Is it possible to add an image directly onto the style, so that it can be later used for a symbol layer? And take advantage of the SDF option for colorable icons?

The reason I bring this is up is we load the style.json between two different codebases and don't want to have to use the addImage() call in both when they try to use the same styling of data. It seems weird that you can add/load an image through this call but not specify it directly in the style for use for a symbol layer. Sprite map would work if it was colorable or if you could have multiple sprite maps, but I don't think either of those are an option.

Links to related documentation

All I can find is the link to this, but this sort of "image" (bounded by latitude/longitude) isn't what I'm looking for.

Higuy8000 avatar Aug 24 '22 18:08 Higuy8000