[Users] bug with layers having a WMS LAYERS value of 0

Charlton Galvarino charlton at 2creek.com
Sat Dec 3 04:00:46 CET 2011


Sorry, Bart.  I mean to mention that.

v. 1.0

The error is line 33 of GeoExt.js.

this.items.get(0).setText is not a function

Original line:

if(this.items.get(0).text!==title){this.items.get(0).setText(title);}

Hack to keep things moving:

if(this.items.get(0).text!==title && false){this.items.get(0).setText(title);}

From: Bart van den Eijnden [mailto:bartvde at osgis.nl]
Sent: Friday, December 02, 2011 8:44 PM
To: Charlton Galvarino
Cc: users at geoext.org
Subject: Re: [Users] bug with layers having a WMS LAYERS value of 0

What version of GeoExt?

I cannot reproduce this on the latest.

Best regards,
Bart

--
Bart van den Eijnden
OSGIS - http://osgis.nl

On Dec 3, 2011, at 2:38 AM, Charlton Galvarino wrote:


I did get around this by preventing a small block (of setText I think) from being executed in GeoExt.js, but that didn't seem like a robust fix to me.

From: users-bounces at geoext.org<mailto:users-bounces at geoext.org> [mailto:users-bounces at geoext.org]<mailto:[mailto:users-bounces at geoext.org]> On Behalf Of Charlton Galvarino
Sent: Friday, December 02, 2011 8:33 PM
To: users at geoext.org<mailto:users at geoext.org>
Subject: [Users] bug with layers having a WMS LAYERS value of 0

The legend panel seems to have fatal issues when a new OpenLayers.Layer.WMS's LAYERS value is 0 as in 'zero'.

Take the stock legendpanel.html as an example.

Instead of the default Tasmania layer which looks like this:

        new OpenLayers.Layer.WMS(
            "Tasmania",
            "http://demo.opengeo.org/geoserver/wms?",
            {layers: 'topp:tasmania_state_boundaries', format: 'image/png', transparent: true},
            {singleTile: true}),

. . . simply swap out the proper LAYERS value for a '0' which ends up looking like this:

        new OpenLayers.Layer.WMS(
            "Tasmania",
            "http://demo.opengeo.org/geoserver/wms?",
            {layers: '0', format: 'image/png', transparent: true},
            {singleTile: true}),

Upon refreshing the page, you'll see an immediate GeoExt.js error.  I don't expect an image to show up since the '0' name is made up, but I don't expect the .js error.

This is an issue because my app is supporting dynamic inclusion of remote WMS-es via getcaps parsing.  In one case, lucky me, a layer is named '0'.



Charlton Galvarino
1 (803) 233-6205 : voice
1 (803) 223-9579 :   fax
charlton at 2creek.com<mailto:charlton at 2creek.com>

P.O. Box 50960
Columbia, SC 29250

_______________________________________________
Users mailing list
Users at geoext.org<mailto:Users at geoext.org>
http://www.geoext.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111202/94a8e07a/attachment.htm 


More information about the Users mailing list