Make sure unused layers are hidden
When parsing an old style layer configuration string, make sure any layer which isn't active is marked as invisible so that we don't include it when generating permalinks. Fixes #3773.
This commit is contained in:
parent
254fc8ebbc
commit
d9a8695fb1
1 changed files with 3 additions and 1 deletions
|
@ -251,6 +251,8 @@ function setMapLayers(layerConfig) {
|
|||
|
||||
if (c == "B") {
|
||||
map.setBaseLayer(layers[i]);
|
||||
} else {
|
||||
map.layers[i].setVisibility(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -260,7 +262,7 @@ function setMapLayers(layerConfig) {
|
|||
if (map.layers[i].isBaseLayer) {
|
||||
map.setBaseLayer(map.layers[i]);
|
||||
} else {
|
||||
map.layers[i].setVisibility(true);
|
||||
map.layers[i].setVisibility(true);
|
||||
}
|
||||
} else {
|
||||
map.layers[i].setVisibility(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue