<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>RS: [Users] Error in WMSBrowserTreePanel.js</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi Alexandre,<BR>
<BR>
Next Monday is local holiday in Barcelona, but on Tuesday I will do your petition.<BR>
<BR>
Thanks a lot,<BR>
<BR>
Antoni.<BR>
<BR>
<BR>
-----Missatge original-----<BR>
De: users-bounces@geoext.org en nom de Alexandre Dubé<BR>
Enviat el: dv. 21/09/2012 16:41<BR>
Per a: users@geoext.org<BR>
Tema: Re: [Users] Error in WMSBrowserTreePanel.js<BR>
<BR>
Hi Antoni,<BR>
<BR>
I think I found what the issue is. If you take a look at the<BR>
capabilities returned by that WMS service, you'll notice a "max"<BR>
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<BR>
"infinity". At some point, the number of zoom levels is calculated<BR>
using the min and max scales properties of the layers, which ends up<BR>
equalling to "infinity". This is the line that, in the end, throws the<BR>
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<BR>
OpenLayers. Would you please try making a small example using your<BR>
capabilities GML returned (as plain text, in a file) and use<BR>
OpenLayers.Format.WMSCapabilities to read it and see if the layer<BR>
minScale property is equal to "infinity" as well ? That would become a<BR>
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>
><BR>
> Hi list,<BR>
><BR>
> I'm testing WMSBrowser example in my production server and it works<BR>
> fine calling some WMS servers but in some cases, it doesn't.<BR>
><BR>
> Open <A HREF="http://www.icc.cat/WMSBrowser/examples/WMSBrowserICC.html">http://www.icc.cat/WMSBrowser/examples/WMSBrowserICC.html</A> (it<BR>
> uses EPSG:23031) and try the following WMS servers:<BR>
><BR>
> A.OK: <A HREF="http://sima.gencat.cat/DMAH_ws/SIMA_OGC/MapServer/WMSServer">http://sima.gencat.cat/DMAH_ws/SIMA_OGC/MapServer/WMSServer</A>?<BR>
><BR>
> B.NOT OK:<BR>
> <A HREF="http://siurana.igc.cat/arcgis/services/geotermia/amplitud_termica/MapServer/WMSServer">http://siurana.igc.cat/arcgis/services/geotermia/amplitud_termica/MapServer/WMSServer</A><BR>
><BR>
><BR>
> Firebug shows an "invalid array length" produced in<BR>
> WMSBrowserTreePanel.js line 111, when layer must be added to previewMap...<BR>
><BR>
> Maybe somebody could light me.<BR>
><BR>
> Regards,<BR>
><BR>
> *Antoni Vidal*<BR>
><BR>
> Unitat d'Aplicacions SIG-WEB<BR>
> Institut Cartogrŕfic de Catalunya<BR>
> <<A HREF="http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392">http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392</A>><BR>
> Parc de Montjuďc, E-08038 Barcelona<BR>
> Tel. (+34) 93 567 15 00 (ext. 3228)<BR>
> www.icc.cat <<A HREF="http://www.icc.cat/">http://www.icc.cat/</A>><BR>
><BR>
><BR>
><BR>
> _______________________________________________<BR>
> Users mailing list<BR>
> Users@geoext.org<BR>
> <A HREF="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR>
<BR>
<BR>
--<BR>
Alexandre Dubé<BR>
Mapgears<BR>
www.mapgears.com<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>