I'm confused.  vector-legend.js in the examples has the following code:

 

    legendPanel = new GeoExt.LegendPanel({

        map: mapPanel.map,

        renderTo: "legend",

        border: false

    });

 

Looking at the source for GeoExt.LegendPanel, I don't see where the map
option is being used.  It looks like the relevant info is being obtained
either through the layerStore option or via the following snippet in the
onRender function:

 

        if(!this.layerStore) {

            this.layerStore = GeoExt.MapPanel.guess().layers;

        }

 

Can anyone explain why the map option is there?  Is that just a remnant from
a previous revision etc. or am I missing something?

 

Also-even more puzzling-I would have expected the vector legend example to
demonstrate the new GeoExt.VectorLegend widget.  What's up with that?

 

Thanks

Gary

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to