<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi Antoni,<br>
<br>
I added the list in CC.<br>
<br>
The tree uses the WMSCapabilitiesLoader to trigger the WMS
GetCapabilities requests. Looking at the code in GeoExt 1.1, is
parameters are returned by the getParams methos, which looks like
this :<br>
<br>
getParams: function(node) {<br>
return {'service': 'WMS', 'request': 'GetCapabilities'};<br>
},<br>
<br>
You could try to override this method :<br>
<br>
GeoExt.tree.WMSCapabilitiesLoader.prototype.getParams =
function(node) {<br>
return {'service': 'WMS', 'request': 'GetCapabilities',
'version': '1.1.1'};<br>
}; <br>
<br>
HTH,<br>
<br>
Alexandre<br>
<br>
<br>
On 12-09-25 08:36 AM, Vidal, Antoni wrote:<br>
</div>
<blockquote
cite="mid:0DE954D12A8B9C49B1DEB8AE54AB8BCDA508F1@bellmunt.icc.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 12 (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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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 amb format previ Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EstilCorreuElectrnic18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLambformatpreviCar
        {mso-style-name:"HTML amb format previ Car";
        mso-style-priority:99;
        mso-style-link:"HTML amb format previ";
        font-family:Consolas;
        color:black;}
span.EstilCorreuElectrnic21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1162551237;
        mso-list-type:hybrid;
        mso-list-template-ids:1141640496 67305493 67305497 67305499 67305487 67305497 67305499 67305487 67305497 67305499;}
@list l0:level1
        {mso-level-number-format:alpha-upper;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level2
        {mso-level-tab-stop:72.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level3
        {mso-level-tab-stop:108.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level4
        {mso-level-tab-stop:144.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level5
        {mso-level-tab-stop:180.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level6
        {mso-level-tab-stop:216.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level7
        {mso-level-tab-stop:252.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level8
        {mso-level-tab-stop:288.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l0:level9
        {mso-level-tab-stop:324.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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:#1F497D">Hi Alexander,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">I’ve made the
test, and GML as plain text in a file parsed by
OpenLayers.Format.WMSCapabilities get a layer with minScale
to “infinity”.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Notice that
this property becomes to WMS version 1.1.1, and the server
response is version 1.3.0 by default, not our case because
OpenLayers use 1.1.1 if not provided.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">What do you
think it could be the best solution?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Antoni<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">De:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a class="moz-txt-link-abbreviated" href="mailto:users-bounces@geoext.org">users-bounces@geoext.org</a>
[<a class="moz-txt-link-freetext" href="mailto:users-bounces@geoext.org">mailto:users-bounces@geoext.org</a>] <b>En nom de </b>Alexandre
Dubé<br>
<b>Enviat:</b> viernes, 21 de septiembre de 2012 16:42<br>
<b>Per a:</b> <a class="moz-txt-link-abbreviated" href="mailto:users@geoext.org">users@geoext.org</a><br>
<b>Tema:</b> Re: [Users] Error in WMSBrowserTreePanel.js<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Antoni,<br>
<br>
I think I found what the issue is. If you take a look at
the capabilities returned by that WMS service, you'll notice
a "max" attribute equal to "Infinity" inside ScaleHint nodes
: <br>
<br>
<ScaleHint min="39.597980"
max="Infinity"></ScaleHint><br>
<br>
OpenLayers reads this and sets the layer minScale property
to "infinity". At some point, the number of zoom levels is
calculated using the min and max scales properties of the
layers, which ends up equalling to "infinity". This is the
line that, in the end, throws the error (in Layers.js, in
calculateResolutions) :<br>
<br>
var resolutions = new Array(numZoomLevels);<br>
<br>
numZoomLevels equals "infinity". I think you found a bug
in OpenLayers. Would you please try making a small example
using your capabilities GML returned (as plain text, in a
file) and use OpenLayers.Format.WMSCapabilities to read it
and see if the layer minScale property is equal to
"infinity" as well ? That would become a nice test-case to
reproduce the issue.<br>
<br>
Best regards,<br>
<br>
Alexandre<br>
<br>
<br>
On 12-09-21 09:02 AM, Vidal, Antoni wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi list,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I’m testing WMSBrowser example in my
production server and it works fine calling some WMS servers
but in some cases, it doesn’t.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Open <a moz-do-not-send="true"
href="http://www.icc.cat/WMSBrowser/examples/WMSBrowserICC.html">http://www.icc.cat/WMSBrowser/examples/WMSBrowserICC.html</a>
(it uses EPSG:23031) and try the following WMS servers:<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">A.<span style="font:7.0pt
"Times New Roman""> </span></span><!--[endif]-->OK:
<a moz-do-not-send="true"
href="http://sima.gencat.cat/DMAH_ws/SIMA_OGC/MapServer/WMSServer">http://sima.gencat.cat/DMAH_ws/SIMA_OGC/MapServer/WMSServer</a>?
<o:p></o:p></p>
<p class="MsoListParagraph"
style="text-indent:-18.0pt;mso-list:l0 level1 lfo2"><!--[if !supportLists]--><span
style="mso-list:Ignore">B.<span style="font:7.0pt
"Times New Roman""> </span></span><!--[endif]-->NOT
OK: <a moz-do-not-send="true"
href="http://siurana.igc.cat/arcgis/services/geotermia/amplitud_termica/MapServer/WMSServer">http://siurana.igc.cat/arcgis/services/geotermia/amplitud_termica/MapServer/WMSServer</a>
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Firebug shows an “invalid array length”
produced in WMSBrowserTreePanel.js line 111, when layer must
be added to previewMap...<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Maybe somebody could light me.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#0D0D0D">Antoni
Vidal</span></b><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:gray">Unitat
d'Aplicacions SIG-WEB<br>
<a moz-do-not-send="true"
href="http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392"><span
style="color:gray">Institut Cartogràfic de Catalunya</span></a><br>
Parc de Montjuïc, E-08038 Barcelona<br>
Tel. (+34) 93 567 15 00 (ext. 3228)<br>
<a moz-do-not-send="true" href="http://www.icc.cat/">www.icc.cat</a></span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:Users@geoext.org">Users@geoext.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif""><br>
<br>
<br>
<o:p></o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre>Alexandre Dubé<o:p></o:p></pre>
<pre>Mapgears<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://www.mapgears.com">www.mapgears.com</a><o:p></o:p></pre>
</div>
</blockquote>
<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>