[Users] map config option in Vector Legend example?

Tim Schaub tschaub at opengeo.org
Thu Mar 25 17:28:48 CET 2010


Gary White wrote:
> I'm confused.  vector-legend.js in the examples has the following code:
> 
>  
> 
>     legendPanel = new GeoExt.LegendPanel({
> 
>         map: mapPanel.map,
> 
>         renderTo: "legend",
> 
>         border: false
> 
>     });
> 

That was based on an old API.  I corrected the example so that the 
legend panel gets a reference to the layer store instead.

(This obviously doesn't deserve a new RC, but I opened a ticket and 
marked the change "pullup" if Eric wants to include it in the final.)

Tim

>  
> 
> 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
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.


More information about the Users mailing list