[OpenLayers-Users] SLD_BODY too many characters
Andreas Hocevar
ahocevar at opengeo.org
Thu Nov 5 04:25:10 EST 2009
Hi,
a few questions:
Which browser were you trying? The only browser that requires
Layer.WMS.Post is Internet Explorer. Other browsers can handle long URLs
in Get requests fine. Layer.WMS.Post uses Get by default in Opera and
Firefox, unless you configure it with the usupportedBrowsers option set
to []:
var layer = new OpenLayers.Layer.WMS.Post("name", "url", {
sld_body: "your sld body here"
}, {
unsupportedBrowsers: []
});
If it works after that change, then your server cannot handle long URLs.
If it still does not work, then something is wrong with your SLD. Did
you try if it validates? Or if it works when using SLD with a url
reference instead of SLD_BODY?
Regards,
Andreas.
stash wrote:
>
> Roald de Wit-2 wrote:
>
>> Hi stash,
>>
>> If you dare to 'live on the edge', use the development version of OL,
>> which has the following great addition: a WMS Post Layer [2]
>>
>> That should solve your problem!
>>
>> [1] http://dev.openlayers.org/nightly/OpenLayers.js
>> [2] http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS/Post-js.html
>>
>> Regards, Roald
>>
>>
>>
>
> Hi,
> thanks for your answer. I imported the new nightly version of openlayers and
> changed my wms in a wms.post. However, i get the same result.
>
> Apparently, my slb_body is to large (because everything works when i made my
> sld_body a bit shorter.)
>
> Do I have to change more (for example params or something else) when i use a
> wms.post? Because the only thing I changed when i declare my
> openlayers.layer.wms is that I changed it into wms.post.
>
> Regards
> stash
>
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
More information about the Users
mailing list