Niyaz
Niyaz

Reputation: 927

how to put custom layer above Marker layer in mapbox-gl-js

Is there any way to put(a higher z-index) the below line (Mapbox layer) above This HTML marker(In my case chart)? If not, what is the alternative?

enter image description here

enter image description here

Upvotes: 1

Views: 898

Answers (1)

Steve Bennett
Steve Bennett

Reputation: 126527

No, HTML elements exist in the layer above the Mapbox GL JS canvas.

You could create two Mapbox GL JS elements, keep them in sync (movement-wise), with the top one containing just the line layer, with no background.

Upvotes: 2

Related Questions