[Users] TreePanel with Vector Legend
Adam Ratcliffe
adam at prema.co.nz
Mon Aug 2 09:27:03 CEST 2010
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.
>
>
More information about the Users
mailing list