Skip to content

Commit 56f4945

Browse files
authored
Merge pull request #4525 from plotly/mapbox-raster-layer-opacity
Fix mapbox layer opacity for raster types
2 parents 8122c21 + abe0569 commit 56f4945

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/plots/mapbox/layers.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ function convertOpts(opts) {
246246
break;
247247
case 'raster':
248248
Lib.extendFlat(paint, {
249-
'raster-fade-duration': 0
249+
'raster-fade-duration': 0,
250+
'raster-opacity': opts.opacity
250251
});
251252
break;
252253
}
-25.3 KB
Loading

test/image/mocks/mapbox_layers.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@
574574
[-71.516, 37.936],
575575
[-80.425, 37.936]
576576
],
577-
"source": "https://docs.mapbox.com/mapbox-gl-js/assets/radar.gif"
577+
"source": "https://docs.mapbox.com/mapbox-gl-js/assets/radar.gif",
578+
"opacity": 0.3
578579
}
579580
]
580581
},

0 commit comments

Comments
 (0)