Oops, sorry. I had missed the "TreePanel" part of your original mail (thought you wanted a VectorLegend in your LegendPanel). At this point, you cannot render a legend with a tree node. There are several tickets with patches already, which may help you:
http://trac.geoext.org/ticket/185 http://trac.geoext.org/ticket/139 Regards, Andreas. On Aug 2, 2010, at 09:27 , Adam Ratcliffe wrote: > That's great. > > Just one question, how do I configure my TreePanel to create the node > with a vector legend instead of an icon, my current tree configuration > looks like this: > > var config = { > autoScroll: true, > animate: true, > border: false, > region: 'center', > stateful: true, > root: new GeoExt.tree.LayerContainer({ > text: 'Layers', > loader: new GeoExt.tree.LayerLoader({ > store: this.layerStore, > createNode: function(attr) { > var layer = attr.layer; > attr.iconCls = layer.gsGeometryType ? 'icon_' > + layer.gsGeometryType.toLowerCase() : 'icon_point'; > return > GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr); > } > }), > layerStore: this.layerStore, > leaf: false, > expanded: true > }) > } > > Cheers > Adam > > On Mon, Aug 2, 2010 at 6:13 PM, Andreas Hocevar <[email protected]> wrote: >> Hi, >> >> On Aug 2, 2010, at 05:41 , Adam Ratcliffe wrote: >> >>> I'd like to dynamically render symbols based upon the layer geometry >>> type and styles in a TreePanel similar to the vector legend example >>> here: http://dev.geoext.org/trunk/geoext/examples/vector-legend.html >>> >>> Is this possible? >> >> Yes! Just configure your vector layer with a StyleMap. The VectorLegend will >> be built from the style and rules of the "default" render intent. >> >> Regards, >> Andreas. >> >>> >>> Cheers >>> Adam >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://www.geoext.org/cgi-bin/mailman/listinfo/users >> >> >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
