<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Lucia,<br>
<br>
See my in-line comments :<br>
<br>
On 11-04-03 09:22 AM, Morper-Busch, Lucia wrote:
<blockquote
cite="mid:7506863B0141334AA8B9FAAAC6D703B001F6B4AB@MAIL2.plus.sbg.ac.at"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Courier New \; color\: red\;";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Courier New \;";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.E-MailFormatvorlage19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.E-MailFormatvorlage21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">Hello Alexandre, hi GeoExt users,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">I tried your WMSBrowser. Very good work!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">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 (</span><u><span style="color:
windowtext;" lang="EN-US"><a moz-do-not-send="true"
href="http://localhost:8080/geoserver/wms?request=getcapabilities&namespace=myWorkspace">http://localhost:8080/geoserver/wms?request=getcapabilities&namespace=myWorkspace</a></span></u><span
style="color: rgb(31, 73, 125);" lang="EN-US">)</span></p>
</div>
</blockquote>
<br>
Could you send a one of your xml files (off-list or using paste-bin
if it's too big for the mailing list) ?<br>
<br>
<br>
<blockquote
cite="mid:7506863B0141334AA8B9FAAAC6D703B001F6B4AB@MAIL2.plus.sbg.ac.at"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">The only example loading WMSCapabilities, that
runs in my environment, is the <b>WMSCapabilitiesStore</b>
that loads the layers from my Geoserver to a gridpanel.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">What I want:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">A combobox with several paths to Geoservers,
when selected one Geoserver, loading the layers into a
LayerTree (LayerTreeBuilder).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">I manage the parent and children nodes (groups)
by adding some keywords to the layers in the geoserver.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">var array
= grid.getStore().getRange(); <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">for(var i
= 0 ; i < array.length ;i++){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US"> var
record = array[i];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US"> var
copy = record.copy();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
copy.data["layer"] = record.getLayer();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
copy.getLayer().mergeNewParams({<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
format: "image/png",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
transparent: "true",<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
tiled: "true"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US"> });<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
copy.getLayer().visibility = false;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US"> </span><span
style="font-family: "Courier New"; color: rgb(0,
176, 80);" lang="EN-US">// adding only layers with a keyword
(=group in LayerTreeBuilder)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(0, 176, 80);" lang="EN-US"> //
e.g. keywords=“Test area 1/Parcels”<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
if(record.get("keywords").length !== 0){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
var keywords = record.get("keywords")[0];<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
copy.getLayer().options.group = keywords;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
var firstKeyword = keywords.split("/")[0];<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left: 35.4pt; text-indent:
35.4pt;"><span style="font-family: "Courier New";
color: rgb(0, 176, 80);" lang="EN-US">//tag = test area to
show<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
if (firstKeyword == tag){<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
mapPanel.layers.add(copy); <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">
}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family: "Courier
New"; color: rgb(31, 73, 125);" lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">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.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">How to bypass the gridpanel?</span></p>
</div>
</blockquote>
<br>
You code looks okay. It also doesn't seem to require any
gridPanel. Try to remove it and use the store only. Using the your
server combobox, when a new element is selected, change the store
proxy url then reload it. In the WMSBrowser, when using the
"layerBrowserXtype" equal to Ext.grid.GridPanel.xtype, it does that
: <br>
<br>
// change the url of the capability store proxy<br>
this.capStore.proxy.setUrl(url);<br>
this.capStore.proxy.setApi(Ext.data.Api.actions.read,
url);<br>
this.capStore.load();<br>
<br>
That piece of code reload the store data with the new url. You
would then need to remove the overlay nodes from your LayerTree,
then loop through the new records of the store again and add them
(like you're already doing).<br>
<br>
Does that make sense ?<br>
<br>
<br>
<blockquote
cite="mid:7506863B0141334AA8B9FAAAC6D703B001F6B4AB@MAIL2.plus.sbg.ac.at"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color: rgb(31, 73, 125);"
lang="EN-US">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?</span></p>
</div>
</blockquote>
<br>
I don't know why it's not working as it should. Again, you could
share one of your xml. I'd try it with the WMSBrowser to see what's
going wrong.<br>
<br>
Best regards,<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>