stadtlandfluss

Where can I report a bug?

Discussion created by stadtlandfluss on Oct 24, 2012
I just changed my project from Version 2.8 to 3.2. Most of my code still works fine. I have a function, which changes my custom basemaps. So a Layer-Object will be removed and later re-added. When I remove the Layer it dissapear from the Map. If I add the same layer again it will not show it. If I try to remove this added layer I get an error.

This code works in Version 2.8 but not in 3.2:

function(mId) {
  var pMap = this.map;
  var pDoRemove = false;
  
  if (this.activeBasemap !== null){
   this.lastBasemap = this.activeBasemap;
   pDoRemove = true;
  }
  
  if (pDoRemove){
   Ext.each(this.lastBasemap.layers, function(layer,index,allLayers){
    try{
     pMap.removeLayer(layer);
    } catch(err){
     var i =10;
    }
    
   }); 
  }
  
  if (mId >= 0){
   this.activeBasemap = this.basemaps[mId];
   
   Ext.each(this.activeBasemap.layers, function(layer,index,allLayers){
    pMap.addLayer(layer, index);
   });  
  }else{
   this.activeBasemap = null
  }
  
  
  this.fireEvent('basemapChanged',this.activeBasemap);
  }


Is this a bug from 3.2 or did I miss something in 3.2?

best regards

Urs

Outcomes