{"version":"1.0","type":"rich","title":"Adjust a layer's opacity","description":"This example demonstrates how to interactively adjust the opacity of a raster layer on a Mapbox GL map. It displays a historical map layer (HOLC1939) over a modern base style, with a slider control in a top-left overlay panel. Dragging the slider updates the layer’s transparency in real time using `map.setPaintProperty` with the `raster-opacity` property. The code uses the Mapbox GL JS API (v0.49.0) and loads its tile data from a Mapbox-hosted raster source.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-d4456679ef3a41c1c5a24e1bb459d855?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}