[OpenLayers-Users] Problems with SLD_BODY

Arnd Wippermann arnd.wippermann at web.de
Fri Jan 8 10:02:39 EST 2010


Hi,

I have setup my SLD online example [1] to WMS.Post for IE and things seems
to work. But zoom and pan will raise an error. This can also be seen with
the OpenLayers example [2], when you zoom out and pan around.

The errorline refers to Line 541
this.observers[cacheID].push({'element':element,'name':name,'observer':obser
ver,...

I'm using IE6 and OpenLayers.js from dev.

Nevertheless an interesting technic to get SLD_BODY work with IE!

Arnd

[1] http://gis.ibbeck.de/OLClient/examples/wms_sld_world_ie_post.asp
[2] http://openlayers.org/dev/examples/WMSPost.html



-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Andreas Hocevar
Gesendet: Freitag, 8. Januar 2010 12:15
An: fsalasGeocuba; users at openlayers.org
Betreff: 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>Us
> erSelection</Name><FeatureTypeStyle><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>FV</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>L</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/FFENFL.png"/><Format>i
> mage/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Op
> acity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Lite
> ral></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>FA</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>L</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/FFENFL.png"/><Format>i
> mage/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Op
> acity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Lite
> ral></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqua
> lTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lit
> eral>L</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><G
> raphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/FFENFL.png"/><Format>i
> mage/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Op
> acity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Lite
> ral></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>ENF</Literal></PropertyIsEqua
> lTo><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lit
> eral>C</Literal></PropertyIsEqualTo></And></Filter><PointSymbolizer><G
> raphic><ExternalGraphic><OnlineResource
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/ENFC.png"/><Format>ima
> ge/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opac
> ity><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Litera
> l></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>L</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>co
> lor</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>im
> age/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opa
> city><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Liter
> al></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>L</Literal></PropertyIsEqualTo>
> <PropertyIsEqualTo><PropertyName>color</PropertyName><Literal>Roja</Li
> teral></PropertyIsEqualTo></And></Filter><PointSymbolizer><Graphic><Ex
> ternalGraphic><OnlineResource 
> xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
> xlink:href="file:/D:/AppServ/www/SIGANAV/images/BZL-R.png"/><Format>im
> age/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opa
> city><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Liter
> al></Rotation></Graphic></PointSymbolizer></Rule><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>L</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>co
> lor</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>im
> age/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opa
> city><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Liter
> al></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>Us
> erSelection</Name><FeatureTypeStyle><Rule><Filter
> xmlns:gml="http://www.opengis.net/gml"><And><PropertyIsEqualTo><Proper
> tyName>tipo_senal</PropertyName><Literal>BZ</Literal></PropertyIsEqual
> To><PropertyIsEqualTo><PropertyName>ciega_luminica</PropertyName><Lite
> ral>C</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>co
> lor</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>im
> age/gif</Format></ExternalGraphic><Opacity><Literal>1.0</Literal></Opa
> city><Size><Literal>20.0</Literal></Size><Rotation><Literal>0.0</Liter
> al></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