How to determine the sequence of raster/tile layers through the layer ID

The map layers object has a below field that is described as follows:

Determines if the layer will be inserted before the layer with the specified ID. If omitted or set to ‘’, the layer will be inserted above every existing layer.

I cannot find how the ID mentioned here can be determined? From the docs I know “traces” is an option, but how do you set the sequence when you have multiple raster layers?

In this pen, the sequence is OK, but when I add additional traces, the tiles are re-fetched for each JS event. So I’m wondering whether I should use the “below” field differently.

You could use leaflet, thats what i prefer when working with tilelayers

1 Like

I’m not sure whether Leaflet is as suited for plotting scatter traces on top of tile layers (I have no experience with it)?

Since tile layers are supported by Plotly, I’d prefer to remain in that eco-system for now and hope someone can look into this (documentation?) issue.