Description
Overview
I would like to overlay a mapbox image
layer on top of a mapbox raster
layer and update the image
layer's coordinates
and/or source
properties in response to zoom/pan events using Plotly.react
On initial render, everything works fine and the z-order of the two layers matches the order in the layout.mapbox.layers
array. However, after updating the image layer's coordinates
in a plotly_relayout
callback, the image layer is pushed behind the raster layer.
Here's an example, where the opacity of the raster layer is set to 0.5 so that you can see the image behind it.
Codepen: https://codepen.io/jonmmease/pen/vYKvxwx?editors=1010
Unless anyone has an idea of what might be going on here, I'll start poking around in https://github.com/plotly/plotly.js/blob/master/src/plots/mapbox/layers.js.