[OpenLayers-Users] Problems with SLD_BODY

Florent Gravin florent.gravin at gmail.com
Fri Jan 29 11:28:18 EST 2010


Layer.WMS.Post gives me very strange behavior on my layer (with FireFox) :
- first the layer is white
- then layer appears
- when i move the map, everything around the map is moving like an 
earthquake...

i can't use it =)
i will use sld param instead, but it's a pity

thks


----- Original Message ----- 
From: "Andreas Hocevar" <ahocevar at opengeo.org>
To: "fsalasGeocuba" <fsalas at geocuba.cu>; <users at openlayers.org>
Sent: Friday, January 08, 2010 12:14 PM
Subject: Re: [OpenLayers-Users] Problems with SLD_BODY


you can use Layer.WMS.Post instead of Layer.WMS, and things should be fine.

Regards,
Andreas.

2010/1/7, fsalasGeocuba <fsalas at geocuba.cu>:
> Hi,
>
> I´m trying to apply one new style to point layer using for that the 
> property
> SLD_BODY.
>
> For do this operation I do with my own rules one StyledLayerDescriptor but
> here is the problem, when hay try to put
>
> more of six rules, no drawing me the layer. My questions is.
>
> There are rulers´s limits for SLD_BODY?
>
> Example:
>
> function Change_Styles()
>
> {
>
> map.layers[0].params.SLD_BODY = '<StyledLayerDescriptor
> version="1.0.0"><UserLayer><Name>topp:sennal</Name><UserStyle><Name>UserSelection</Name><FeatureTypeStyle><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>FV</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>FA</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>C</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/ENFC.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Verde</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-V.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Roja</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-R.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Amarilla</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-A.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></UserLayer></StyledLayerDescriptor>';
> //map.layers[0].params.SLD_BODY = '<StyledLayerDescriptor
> version="1.0.0"><UserLayer><Name>topp:sennal</Name><UserStyle><Name>UserSelection</Name><FeatureTypeStyle><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>C</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Amarilla</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZC-A.png"/><Format>image/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Graphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></UserLayer></StyledLayerDescriptor>';
>
> map.layers[0].redraw();
>
> }
>
>
>
>
>
> Greetings Salas
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>

-- 
Von meinen Mobilgerät aus gesendet

Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users 




More information about the Users mailing list