You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Leaflet Control Layers, the attribution of the WMS Layer stays the same.
// Add WMS source/layers
var source = L.wms.source("http://ows.terrestris.de/osm/service", {
"format": "image/png",
"transparent": "true",
"attribution": "Some attribution to be removed, when 'Topographic' is not selected in LayerControls",
"info_format": "text/html",
"tiled": false
});
var layers = {'Topographic': source.getLayer("TOPO-WMS").addTo(map)};
// Create layer control
L.control.layers(undefined, layers).addTo(map);
When using Leaflets WMS Method, the attribution is shown and hidden correctly:
var source = L.tileLayer.wms('http://ows.terrestris.de/osm/service?', {
layers: "TOPO-WMS",
format: "image/png",
transparent: "true",
attribution: "Some attribution to be removed, when 'Topographic' is not selected in LayerControls",
info_format: "text/html",
tiled: false
})
var layers = {'Topographic': source.addTo(map)};
// Create layer control
L.control.layers(undefined, layers).addTo(map);
The text was updated successfully, but these errors were encountered:
When using Leaflet Control Layers, the attribution of the WMS Layer stays the same.
When using Leaflets WMS Method, the attribution is shown and hidden correctly:
The text was updated successfully, but these errors were encountered: