<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 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:<br>
</div>
<blockquote
cite="mid:0DE954D12A8B9C49B1DEB8AE54AB8BCDA505AA@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
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;}
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";}
span.EstilCorreuElectrnic17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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;}
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">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 lfo1"><!--[if !supportLists]--><span
style="mso-list:Ignore">A.<span style="font:7.0pt
"Times New Roman""> </span></span><!--[endif]-->OK:
<a class="moz-txt-link-freetext" 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 lfo1"><!--[if !supportLists]--><span
style="mso-list:Ignore">B.<span style="font:7.0pt
"Times New Roman""> </span></span><!--[endif]-->NOT
OK:
<a class="moz-txt-link-freetext" 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><span style="color:#0D0D0D"><o:p></o:p></span></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/"><span
style="color:blue">www.icc.cat</span></a></span><span
style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</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>