[Users] tree config and SelectFeature

Jim White jbw2003 at earthlink.net
Sun Jan 15 19:16:24 CET 2012


Hi,

I have a small problem or a bug in my web app. I had a SelectFeature 
button on my toolbar like this:

var parcels = [deeds, deeds2];
var select_control = new OpenLayers.Control.SelectFeature(parcels);

This worked until I changed my TreePanel to use BaseLayerContainer and 
OverlayLayerContainer instead of just one LayerContainer.

  var rootNode = {
     text: "map layers",
     expanded: true,
     children: [
        baseLayers,
        overLayers
     ]

    };

     var tree = new Ext.tree.TreePanel({
         border: true,
         region: "west",
         title: 'Layers',
         width: 250,
         root: rootNode,
         rootVisible: false

     });

If I change the root attribute of the treepanel back to the reference to 
the LayerContainer then the selectfeature works.

Is this a bug or is there some problem with my code?

Thanks,
Jim White


More information about the Users mailing list