[OpenLayers-Users] Problems with SLD_BODY

Arnd Wippermann arnd.wippermann at web.de
Thu Jan 7 17:05:36 EST 2010


Hi,

I would suggest, that with your SLD_BODY (6050 chars; more rules, more
chars) the url get too long. I have the same problem with IE. FF seems to
get along.

Instead of SLD_BODY you can perhaps use SLD and write your SLD_BODY into a
file, that is over http reachable.

Arnd

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von fsalasGeocuba
Gesendet: Donnerstag, 7. Januar 2010 23:48
An: users at openlayers.org
Betreff: [OpenLayers-Users] Problems with SLD_BODY

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>UserSele
ction</Name><FeatureTypeStyle><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>FV</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></P
ropertyIsEqualTo></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/g
if</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size>
<Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></G
raphic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>FA</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></P
ropertyIsEqualTo></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/g
if</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size>
<Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></G
raphic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqualTo><Propert
yIsEqualTo><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/g
if</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size>
<Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></G
raphic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqualTo><Propert
yIsEqualTo><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><L
iteral>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Gra
phic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></P
ropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Liter
al>Verde</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graph
ic><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/gi
f</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><
Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Gr
aphic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></P
ropertyIsEqualTo>
<PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Roja</Literal>
</PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><ExternalGraphi
c><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/gi
f</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><
Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Gr
aphic></PointSymbolizer></Rule><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>L</Literal></P
ropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Liter
al>Amarilla</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Gr
aphic><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/gi
f</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><
Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Gr
aphic></PointSymbolizer></Rule></FeatureTypeStyle></UserStyle></UserLayer></
StyledLayerDescriptor>';
//map.layers[0].params.SLD_BODY = '<StyledLayerDescriptor
version="1.0.0"><UserLayer><Name>topp:sennal</Name><UserStyle><Name>UserSele
ction</Name><FeatureTypeStyle><Rule><Filter
xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><PropertyName
>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqualTo><Property
IsEqualTo><PropertyName>ciega_luminica</PropertyName><Literal>C</Literal></P
ropertyIsEqualTo><PropertyIsEqualTo><PropertyName>color</PropertyName><Liter
al>Amarilla</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><Gr
aphic><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/gi
f</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opacity><Size><
Literal>20.0</Literal></Size><Rotation><Literal>0.0</Literal></Rotation></Gr
aphic></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




More information about the Users mailing list