2
votes

Is it possible to display tileLayer on top of all other layers? This means that all other layers are displayed below the tileLayer.

Googled all day, but couldn't find definite yes or no.

2

2 Answers

2
votes

Yes you can manipulate the order by simply adding this code:

var topPane = map._createPane('leaflet-top-pane', map.getPanes().mapPane);
topPane.appendChild(yourtileLayer.getContainer());
yourtileLayer.setZIndex(5);
2
votes

Create a map pane on top of (with a higher z-index than) the standard tile pane, and position your tile layer in it.

There is an entire Lealfet tutorial on the issue.