Hello Lucia,
I'm interested in adding the OpacitySlider to every layer in treepanel. I've tryed to follow your steps, but I didn't get LayerTreeBuilder.js in my geoext installation !!. Have you an oline example? Thank's a lot. Antoni Vidal Unitat d'Aplicacions SIG-WEB Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392> Parc de Montjuïc, E-08038 Barcelona Tel. (+34) 93 567 15 00 (ext. 3228) www.icc.cat <http://www.icc.cat/> De: [email protected] [mailto:[email protected]] En nom de Morper-Busch, Lucia Enviat: miércoles, 30 de marzo de 2011 12:02 Per a: [email protected] Tema: Re: [Users] OpacitySlider for each Layer in aLayerTree(LayerTreeBuilder) Hello GeoExt users, after long searching for a solution I found the OpacitySliderPlugin, now renamed to ContextMenuPlugin 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 with SliderOptions 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 <http://www.zgis.at/research> Von: [email protected] [mailto:[email protected]] Im Auftrag von Morper-Busch, Lucia Gesendet: Dienstag, 29. März 2011 15:06 An: [email protected] 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 <http://www.zgis.at/research>
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
