On Thursday, March 25, 2010, Gary White <[email protected]> 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 > > }); > > > > 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; > > }
I guess you are right, providing the LegendPanel with the map instance shouldn't be necessary. > 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? Don't you see vector legends in the example? LegendPanel uses VectorLegend internally for vector layers. Cheers, -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 96 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
