Scattermapbox - Markers above layers?

I have a map where I draw some custom layer and want to plot some points. The points appear to be below the custom layer, while I would like them to be plotted on top of it. Is it at all possible?

Note: I create this layer programmatically, so I cannot go on mapbox studio and draw it to be at water level or something like that, I need to do this in code.

Have you tried managing ‘z-index’ property for layers in CSS file?

How do you change z-index just for the layer attribute of scattermapbox? Does it have its own style?

My bad. There isn’t z-index just for layers. Try to change the order of traces when ascribing data to list of traces. Hope this works for you.:wink:

Thanks for your help. What do you mean change the order of traces? I set up the markers under the data field of the figure object, and the layers are in figure->layout->mapbox->layers

figure is a dictionary, so the order in which i set data and layout is not going to be influential? Am I missing something obvious?

I’m sorry. I don`t know how to help you. Paste part of your code if you can, this should be an easier way to help you.

Solved it! In the end this answer: [Solved] Show points above choropleth layer held the key! We can use the below attribute to push a layer down below the markers!

1 Like

How did you find the value for below, please? I am trying to make the layer below a bunch of scatter points created by Scattermapbox

I got it, layers can be found in[REPLACE_WITH_YOUR_OWN_ACCESS_TOKEN]