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.
if (c == "B") {
map.setBaseLayer(layers[i]);
if (c == "B") {
map.setBaseLayer(layers[i]);
+ } else {
+ map.layers[i].setVisibility(false);
if (map.layers[i].isBaseLayer) {
map.setBaseLayer(map.layers[i]);
} else {
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);
}
} else {
map.layers[i].setVisibility(false);