Fix "Layer not found: route-quality" error msg (ignore built-in layers)
This commit is contained in:
parent
b0aa8ec20e
commit
164431dccb
2 changed files with 5 additions and 1 deletions
|
|
@ -2,6 +2,8 @@ BR.LayersConfig = L.Class.extend({
|
|||
defaultBaseLayers: BR.confLayers.defaultBaseLayers,
|
||||
defaultOverlays: BR.confLayers.defaultOverlays,
|
||||
legacyNameToIdMap: BR.confLayers.legacyNameToIdMap,
|
||||
// hardcoded, built-in layers with an id set (for URL hash)
|
||||
builtInLayers: ['route-quality'],
|
||||
|
||||
initialize: function(map) {
|
||||
this._map = map;
|
||||
|
|
|
|||
|
|
@ -270,7 +270,9 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
var obj = this._layers[i];
|
||||
// id set in LayersConfig.createLayer
|
||||
var id = obj.layer.id;
|
||||
if (id) {
|
||||
|
||||
// ignore built-in layers
|
||||
if (id && this.layersConfig.builtInLayers.indexOf(id) === -1) {
|
||||
if (obj.overlay) {
|
||||
overlays.push(id);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue