I have a Leaflet.js map, with a base tile layer, a tile layer and some overlays. I need to place a tile layer above the text ABOVE overlay. I tried to bring it to the end, using bringToFront()- to no avail. Here is the code:
map.addLayer( new L.StamenTileLayer("toner-lines") );
...
var labels = L.tileLayer('http://{s}.www.toolserver.org/tiles/osm-labels-en/{z}/{x}/{y}.png', {
maxZoom: 17,
zIndex: 1000
});
labels.addTo(map);
labels.bringToFront();
source
share