Fix initial baselayer selection if no type was stored.
This commit is contained in:
parent
2bbc117528
commit
abab5f5440
|
@ -366,7 +366,14 @@ function initialize_map() {
|
|||
})
|
||||
|
||||
if (!foundType) {
|
||||
layers[0].setVisible(true);
|
||||
ol.control.LayerSwitcher.forEachRecursive(layers, function(lyr) {
|
||||
if (foundType)
|
||||
return;
|
||||
if (lyr.get('type') === 'base') {
|
||||
lyr.setVisible(true);
|
||||
foundType = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var iconsLayer = new ol.layer.Vector({
|
||||
|
|
Loading…
Reference in a new issue