[Users] map config option in Vector Legend example?

Gary White gary_white at verizon.net
Thu Mar 25 07:24:16 CET 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100325/2b101637/attachment.htm 


More information about the Users mailing list