Hi Lucia,

Could you share a small minimized demo (ideally a live one) of what you're doing ? That way, it would be easier to help.

Regards,

Alexandre


On 11-03-30 06:01 AM, Morper-Busch, Lucia wrote:

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


--
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to