Prevent unnecessary tile loading for default base layer

by only setting it if no layer activated by hash URL
This commit is contained in:
Norbert Renner 2019-04-03 11:54:52 +02:00
parent d60b1ad15f
commit 282edbbc01
5 changed files with 40 additions and 6 deletions

View file

@ -315,6 +315,14 @@ BR.LayersTab = BR.ControlLayers.extend({
return obj;
},
activateDefaultBaseLayer: function () {
var index = BR.conf.defaultBaseLayerIndex || 0;
var activeBaseLayer = this.getActiveBaseLayer();
if (!activeBaseLayer) {
this.activateBaseLayerIndex(index);
}
},
saveRemoveActiveLayers: function () {
this.saveLayers = this.removeActiveLayers();
},