[OpenLayers-Dev] Problems with WMS.Post + singleTile + sld_body

Andreas Hocevar ahocevar at opengeo.org
Wed Apr 20 03:50:25 EDT 2011


Note that the tileOptions: {maxGetUrlLength: 2048} configuration option was added *after* the last release. So can you please try out the latest trunk version of OpenLayers and see what results you get with that?

Andreas.

On Apr 19, 2011, at 15:22 , Carlos Lacerda wrote:

> Hi All,
> 
> I´m user OpenLayers with Geoserver in my projects to render eletrical networks.
> It´s fine for my purposes, but now a found a problem to use singleTile
> with dynamical SLD´s
> 
> Explaining....
> 
> Initially  use WMS.Post to create a layer and send a dynamic SLD using
> sld_body parameter
> 
> var trafo = new OpenLayers.Layer.WMS.Post("Transformadores", wmsServer,{
>             layers: 'axx:TRAFO_PERDAS',
>             cql_filter:"mes_ref='201102'";
>             styles: '',
>     srs: 'EPSG:4326',
>     format: 'image/png',
>     transparent: true,
>     sld_body: sldTrafo.getSLD(),//JS with SLD, its a large SLD
>         }, {
>             'opacity': 1,
>             'isBaseLayer': false,
>             'wrapDateLine': false,
>             buffer: 0,
>            //singleTile:true
>         });
> This layer works fine but have the know problem of  TextSymbolizer
> label near tile edges.
> 
> All right, i add parameter 'singleTile:true' to solve the problem and
> the same solve the problem but have a issue, when zoom or pan the map
> the old image is not distroyed, when pan or zoom new image is created
> correct but old image before created not disapears creating impression
> of a overlay in map, an example if a have an area with five elements
> when zoom this area the five elements is duplicated to ten elements,
> if my SLD chage simbols depending of a scale for example the old
> images are displayed like a overlay.
> It´s necessary some parameter to solve this problem ?
> 
> I´m using IE8.
> 
> Reading documentation about WMS.POST deprecated, i try use Layer.WMS
> using tileOptions: {maxGetUrlLength: 2048}  without success, using
> this method only small SLDs runs.
> How should i use this parameter ??
> 
> When use large SLD with this parameter the folowing error is throw by IE:
> 
> Message: Invalid Pointer
> 
> Line 156
> Character: 49
> Code: 0
> URI: http://openlayers.org/api/OpenLayers.js
> 
> 
> 
> Thanks a lot for any help.
> 
> --
> Sds,
> Carlos Lacerda
> System Architect - CIAS
> Brasil
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



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



More information about the Dev mailing list