stac-layer
stac-layer copied to clipboard
Allow to set style information
Originates from https://github.com/radiantearth/stac-browser/pull/151#issuecomment-1166643330
So it looks like the options object of stac-layer is passed in to the creation of all the leaflet vector layers, so you can just pass in any leaflet path options to control the styling.
const lyr = await L.stacLayer(item, {
debugLevel: 2,
displayPreview: true,
// Any valid leaflet path options
color: 'red'
});

So maybe all that's required is adding something to the doco?
It's indeed possible to pass things through, but it's not very clean that all these additional options get handed over as well. Still, it works so just a bit of documentation might be enough for now.
Supported in the stac-js branch via itemStyle and boundsStyle options.