Hi,

you should use firebug to see what requests were issued and what was
returned. In your case, I suspect that the combination of LAYERS and
SLD_BODY params is invalid and you don't get back an image from your WMS.

Regards,
Andreas.

On 2010-02-17 16:47, David Alda Fernandez de Lezea wrote:
> Hello list,
>
> I had som problems applying a SLD to a OpenLayers.Layer.WMS becuase of the 
> mentioned problem of URL length in IE. I followed up the discussions about 
> this solution and decided to apply it to my app. But I get an error when I 
> try to apply an SLD and make it visible. I mean, I create the layer without 
> any error:
>
> olLayers[0] = new OpenLayers.Layer.WMS.Post( "WMSLayer",url,
>                       { transparent: 'true', layers: 
> 'RecintosSigpac,ParcelasSigpac,PoligonosSigpac'},{visibility: false, 
> displayInLayerSwitcher:false, isBaseLayer: false, units: 'm', maxExtent: new 
> OpenLayers.Bounds(460000, 4710000, 610000, 4820000), maxResolution: 
> 292.96875} );
>
> Then, later, I have some links that the user can click to apply some SLD's to 
> some parcels. I create the SLD dynamically.
>
> var wms = this.map.getLayersByName("megaWMSLayer")[0];
> wms.mergeNewParams({SLD_BODY: sld});
> wms.setVisibility(true);
>
> And the problem comes in the line 'wms.setVisibility(true);'. Debugging the 
> error, I found that it crashes in line 1275 character 174 of OpenLayers.js to 
> be precise. This is the code of that line:
>
> tile.onLoadStart=function(){if(this.numLoadingTiles==0){this.events.triggerEvent("loadstart");}
> this.numLoadingTiles++;};
>
> And the variable tile is undefined.
>
> Is this a known problem or it's just my fault??.
>
> Any ideas??
>  
> Thanks in advance.
>  
> Un saludo,
>  
> ··················································································
>
> David Alda Fernández de Lezea
> Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
>  
> IKT
> Granja Modelo s/n · 01192 · Arkaute (Araba)
>
> ··················································································
> Tlfnos.: 945-00-32-95                         Fax: 945-00.32.90
> ··················································································
> email: [email protected]                                web: www.ikt.es
> ··················································································
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to