Commit a416839d authored by Gérald Niel's avatar Gérald Niel
Browse files

Modif var / let

parent 040f91d4
......@@ -134,18 +134,18 @@ window.addEventListener('load', async function () {
const controlLayer = new L.control.layers(null, null, { collapsed: false });
theMap.addControl(controlLayer);
for (var i = 0; i < baseLayers.length; i++) {
var m = baseLayers[i];
var l = new L.TileLayer(m.url, m.options);
for (let i = 0; i < baseLayers.length; i++) {
let m = baseLayers[i];
let l = new L.TileLayer(m.url, m.options);
controlLayer.addBaseLayer(l, m.name);
if (i === 0) theMap.addLayer(l);
}
for (var i = 0; i < overlayLayers.length; i++) {
var m = overlayLayers[i];
var l = new L.TileLayer(m.url, m.options);
for (let i = 0; i < overlayLayers.length; i++) {
let m = overlayLayers[i];
let l = new L.TileLayer(m.url, m.options);
controlLayer.addOverlay(l, m.name)
/*if (i === 0)*/ theMap.addLayer(l);
theMap.addLayer(l);
}
theMap.on('click', (e) => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment