[OpenLayers-Users] SLD_BODY too many characters

bartvde at osgis.nl bartvde at osgis.nl
Thu Nov 5 03:28:38 EST 2009


Hi,

you are running into the limitation of the url length in the browser.

Which WMS are you using? Maybe you can try Layer.WMS.POST (in trunk) if
your WMS supports POST?

Alternatively, post your string to a custom script on the server, and give
back a url which you can use in the GetMap request using the SLD parameter
instead.

Best regards,
Bart

>
> Hello,
> I have a Openlayers.layer.wms to show a map. Furthermore I have a sld_body
> to show not all features on the map.
>
> My big problem is, that my sld_body is very large (because of some filters
> i've added and various styles). I store my sld_body in a variable in
> javascript and add this variable with merge.newparams to my layer. And
> there
> is the problem.
>
> Thereby my sld_body contains so much characters, the variable doesn't
> contain the whole sld_body --> I get no features on my map. When I make my
> sld_body a bit shorter, everything is working. Then I try to add the
> sld_body direclty to the layer without mergenewparams later. The same
> problem.
>
> I'm sure that the variable can't store so much characters because I
> watched
> my javascript file in firebug and there, the variable didn't contain the
> whole sld_body.
>
> My question is now, if there is any possibility, that i can add my whole
> sld_body to my javascript. Are there variables, which can contain more
> characters in java script.
>
> (Maybe another solution would be to add 2 sld_bodys to my layer. Is this
> possible?)
>
> Please help me.
>
> Regards
> stash
> --
> View this message in context:
> http://n2.nabble.com/SLD-BODY-too-many-characters-tp3950862p3950862.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list