[Users] RS: Error in WMSBrowserTreePanel.js
Vidal, Antoni
antoni.vidal at icc.cat
Sat Sep 22 10:10:19 CEST 2012
Hi Alexandre,
Next Monday is local holiday in Barcelona, but on Tuesday I will do your petition.
Thanks a lot,
Antoni.
-----Missatge original-----
De: users-bounces at geoext.org en nom de Alexandre Dubé
Enviat el: dv. 21/09/2012 16:41
Per a: users at geoext.org
Tema: Re: [Users] Error in WMSBrowserTreePanel.js
Hi Antoni,
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 :
<ScaleHint min="39.597980" max="Infinity"></ScaleHint>
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) :
var resolutions = new Array(numZoomLevels);
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.
Best regards,
Alexandre
On 12-09-21 09:02 AM, Vidal, Antoni wrote:
>
> Hi list,
>
> I'm testing WMSBrowser example in my production server and it works
> fine calling some WMS servers but in some cases, it doesn't.
>
> Open http://www.icc.cat/WMSBrowser/examples/WMSBrowserICC.html (it
> uses EPSG:23031) and try the following WMS servers:
>
> A.OK: http://sima.gencat.cat/DMAH_ws/SIMA_OGC/MapServer/WMSServer?
>
> B.NOT OK:
> http://siurana.igc.cat/arcgis/services/geotermia/amplitud_termica/MapServer/WMSServer
>
>
> Firebug shows an "invalid array length" produced in
> WMSBrowserTreePanel.js line 111, when layer must be added to previewMap...
>
> Maybe somebody could light me.
>
> Regards,
>
> *Antoni Vidal*
>
> Unitat d'Aplicacions SIG-WEB
> Institut Cartogràfic de Catalunya
> <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392>
> Parc de Montjuïc, E-08038 Barcelona
> Tel. (+34) 93 567 15 00 (ext. 3228)
> www.icc.cat <http://www.icc.cat/>
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120922/0f3de8bc/attachment.htm
More information about the Users
mailing list