I was wondering if it's possible to use multiple TileLayers in leaflet at the same time, rather than just having one active? A bit like group layers. In my map I have a base map, and I would like to make another TileLayer with transparent PNG:s where I can have roads, names of places, and so on.
Right now I am following this tutorial to achieve what I want: https://www.hreikin.co.uk/2018/06/07/user-guide-how-to-create-an-interactive-campaign-map-with-leafletjs/
Basically I am working with the following tools: Leaflet as base for the map Zoomify (software) http://www.zoomify.com/ to creat the map Tiles from the image I have made in Photoshop.
The base tile looks like this in the code:
var layer = L.tileLayer.zoomify('./basemap/{g}/{z}-{x}-{y}.jpg', {
width: 19000, // MUST be defined.
height: 10688, // MUST be defined.
minZoom: 2,
maxZoom: 7,
continuousworld: false,
noWrap: true,
}).addTo(map);
Then I have a bunch of markers for cities that are grouped into layers. What I currently would want to do is to make multiple basemaps as layers, rather than toggleable.
As you can see on the layer icon in the top right corner you can only have one active basemap at a time: https://hreikin.co.uk/interactive-campaign-map/interactive-campaign-map.html
Does anyone have any suggestions?
L.TileLayer
s, so the answer is "yes".