[Users] TreePanel with Vector Legend

Adam Ratcliffe adam at prema.co.nz
Mon Aug 2 10:07:36 CEST 2010


Thanks, I'll take a look at the code and see if I can come up with a
workable solution.

Cheers
Adam


On Mon, Aug 2, 2010 at 7:44 PM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> 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 <ahocevar at opengeo.org> 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
>>>> Users at geoext.org
>>>> 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.
>
>


More information about the Users mailing list