Hello Alexandre, hi GeoExt users,

 

I tried your WMSBrowser. Very good work!

Like other Users I don't understand to adapt the path to the xml file. I can't 
show my own xml-file or the direct request 
(http://localhost:8080/geoserver/wms?request=getcapabilities&namespace=myWorkspace).

 

The only example loading WMSCapabilities, that runs in my environment, is the 
WMSCapabilitiesStore that loads the layers from my Geoserver to a gridpanel.

 

What I want:

A combobox with several paths to Geoservers, when selected one Geoserver, 
loading the layers into a LayerTree (LayerTreeBuilder).

 

Now I am able to load my geoserver-layers (which are staying in a certain 
namespace) to a gridpanel. From the gridpanel I can add them to the 
LayerTreeBuilder.

I manage the parent and children nodes (groups) by adding some keywords to the 
layers in the geoserver.

 

var array = grid.getStore().getRange();                             

for(var i = 0 ; i < array.length ;i++){

     var record = array[i];

     var copy = record.copy();

     copy.data["layer"] = record.getLayer();

     copy.getLayer().mergeNewParams({

          format: "image/png",

          transparent: "true",

          tiled: "true"

     });

     copy.getLayer().visibility = false;

     // adding only layers with a keyword (=group in LayerTreeBuilder)

     // e.g. keywords="Test area 1/Parcels"

     if(record.get("keywords").length !== 0){

          var keywords = record.get("keywords")[0];

          copy.getLayer().options.group = keywords;

          var firstKeyword = keywords.split("/")[0];

//tag = test area to show

          if (firstKeyword == tag){

                mapPanel.layers.add(copy);     

          }

     }

}

 

But I don't like to use the gridpanel, my users won't select single layers, but 
all layers within a namespace of a geoserver, that is the path to a Geoserver. 
The layers to add is managed by keywords.

 

How to bypass the gridpanel?

How to make run the other examples with wmscap.xml files as url? E.g. the 
WMSCapabilitiesLoader or your WMSBrowser? Something to do with Proxy?

 

Any suggestions are appreciated!

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: Morper-Busch, Lucia 
Gesendet: Donnerstag, 31. März 2011 12:30
An: 'Alexandre Dube'
Betreff: WMSCapabilitiesLoader with LayerTreeBuilder

 

Hi Alexandre,

thank you for your remarks.

A question: Did you ever think about a combination of your LayerTreeBuilder and 
the WMSCapabilitiesLoader?

This would be very nice. I'd like to refer to my Geoserver (one 
workspace/namespace) and load automaticly all layers to the LayerTree with 
legends... (I'm not able to manage it in a short time)

Best regards

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: Alexandre Dube [mailto:[email protected]] 
Gesendet: Mittwoch, 30. März 2011 14:20
An: Morper-Busch, Lucia
Betreff: Re: OpacitySlider in LayerTreeBuilder

 

Hi Lucia,

  Thanks a lot for your interest in the LayerTreeBuilder tool.


== ContextMenuPlugin ==

  Regarding the ContextMenuPlugin, you could also add it when creating your 
object like this :

    tree = new GeoExt.ux.tree.LayerTreeBuilder({
        width: 250,
        autoScroll: true,
        enableDD: true,
        rootVisible: false,
        lines: false,
        plugins: [new GeoExt.tree.ContextMenuPlugin({ 

          sliderOptions:{

                aggressive: true,

                plugins: new GeoExt.LayerOpacitySliderTip()

                }

    }]

    });

  You're right that it would be nice to have a boolean option for that.  I took 
a note, but a patch with this fix would also be welcomed.  


== Components are hard to find ==

You should raise this comment on the GeoExt-dev mailing list, but I'd also say 
that patches with new examples and documentation are also welcomed.


== Error in ext-all.js ==

Do you know about Firebug ?  If not, it's a javascript debugger add-on you can 
add to Firefox.  Load "ext-all-debug.js" instead of "ext-all.js" and put some 
break points in Firebug in order to help you find out why the code doesn't work.

You could also try to make a very small sample (minimized version of your code) 
of what you're trying to do and make it live on the web so that you could post 
a message on the GeoExt-users mailing list and show exactly what's wrong.


Thanks again for your interest.

Best regards,

Alexandre

== More about "How come I create UX" ? ==

I developed the LayerTreeBuilder widget for a particular client for one of his 
web mapping application.  Most of the time, I try to make a "ux" out of what I 
do so that others can enjoy the work I do, but that also means that when the 
fundings for the development of the tool is depleted, if I want to continue 
upgrading it, I have to wait for more fundings from new projects / clients, 
free time of my own or contribution from other devs.  For the upcoming weeks, I 
won't have much free time.  Like I said earlier, I took note of your comments 
and when I have some free time, I'll work on it.  Patches are welcomed too ;)  



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

Hi Alexandre,

your LayerTreeBuilder is great.

Recently I looked for a Opacity Slider to put it into each layer node.

First I tried to integrate a toolbar as component (like GeoExt Tree Tools: 
http://dev.geoext.org/sandbox/elemoine/playground/geoext/examples/tree-tools.html)

But either it appears the Legend symbology or the Opacity Slider, not both.

Then I tried this:

 

After long searching for a solution I found the OpacitySliderPlugin, now 
renamed to ContextMenuPlugin to integrate into a 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.

Do you 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> 

 





-- 
Alexandre Dubé
Mapgears
www.mapgears.com
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to