[Users] OpacitySlider for each Layer in a LayerTree(LayerTreeBuilder)
Andreas Hocevar
ahocevar at opengeo.org
Wed Mar 30 14:31:07 CEST 2011
Hi,
the easiest way to see what is new in GeoExt is to use the trunk documentation at http://dev.geoext.org/docs/docs.html. It is auto-generated from svn trunk after every commit.
Hope this helps.
Andreas.
On Mar 30, 2011, at 12:01 , Morper-Busch, Lucia wrote:
> Hello GeoExt users,
>
> after long searching for a solution I found the OpacitySliderPlugin, now renamed toContextMenuPlugin to integrate into the LayerTree.
> I inserted the ContextMenuPlugin with a LayerOpacitySliderTip-Plugin in the LayerTreeBuilder.js and now it does what I want:
> Code snippet of LayerTreeBuilder.js:
>
> initComponent: function(){
> this.addEvents(this.CUSTOM_EVENTS);
>
> this.plugins = this.plugins || [];
> this.plugins.push({ptype: "gx_treenodecomponent"});
> this.plugins.push(new GeoExt.ux.plugins.LayerTreeBuilderNodeAgent());
> //Context menu with opacity slider, added by Lucia:
> this.plugins.push(new GeoExt.tree.ContextMenuPlugin({
> sliderOptions:{
> aggressive: true,
> plugins: new GeoExt.LayerOpacitySliderTip()
> }
> })
> );
>
> GeoExt.ux.tree.LayerTreeBuilder.superclass.initComponent.call(this);
> if(!this.layerStore) {
> this.layerStore = GeoExt.MapPanel.guess().layers;
> }
>
> this.layerStore.on({
> "add": this.onLayerAdded,
> "remove": this.onLayerRemoved,
> scope: this
> });
>
> this.layerStore.treeBuilder = this;
> },
>
> Three remarks:
> 1. It’s hard to find new developments. I’m searching always with key words like “opacity slider” “layertree” and similar. In my opinion there is a lack of finding the latest improvements. The code examples are not linked to these key words, isn’t it?
> 2.It would be nice for a boolean option of the LayerTreeBuilder to set “ContextMenu: true/false”, without manipulating the code of the LayerTreeBuilder.js itself. Maybe also withSliderOptions for a possible integrating of the very useful LayerOpacitySliderTip.
> 3. There is a Error executing the new code: "this.dom.style is null or not an object" referring to ext-all.js.
> Does anybody know how to fix it?
>
> Thanks
> Lucia
>
> Dipl.-Geogr. Lucia Morper-Busch | Researcher
> University of Salzburg | Centre for Geoinformatics - Z_GIS
> Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria
> Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260
> > Z_GIS…experts for the spatial view
>
> Von: users-bounces at geoext.org [mailto:users-bounces at geoext.org] Im Auftrag von Morper-Busch, Lucia
> Gesendet: Dienstag, 29. März 2011 15:06
> An: users at geoext.org
> Betreff: [Users] OpacitySlider for each Layer in a LayerTree(LayerTreeBuilder)
>
> Hi GeoExt users,
> I have a second question:
> Do anybody know how to combine LayerTreeBuilder with a OpacitySlider for each visible layer in the tree?
> I managed only either legend or OpacitySlider, but I want both!
> Thank you
> Lucia
>
> Dipl.-Geogr. Lucia Morper-Busch | Researcher
> University of Salzburg | Centre for Geoinformatics - Z_GIS
> Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria
> Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260
> > Z_GIS…experts for the spatial view
>
> _______________________________________________
> 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