[OpenLayers-Users] using SLD with more than once <sld:LineSymbolizer>

Ivan Grcic ivan.grcic at geofoto.hr
Thu Dec 4 14:10:19 EST 2008


Hola,

i dont think its possible use multi symbolizer for vectors in
openlayers. Or you have to draw twice ure lines, each time with other
line symbolizer (im not sure what will be result of that, and i think
dash-array is not supported-someone correct me if im wrong) or just
use WMS - where you can use as many symbolizers as you like ;)

Ta luego



On Thu, Dec 4, 2008 at 3:57 PM, Ignacio Talavera
<ignacio.talavera at gmail.com> wrote:
> Oops sorry :), I'm loading a GML layer from an xml,
> map.addLayer(new OpenLayers.Layer.GML(layerName, gmlUrl,
>   {styleMap: new
> OpenLayers.StyleMap(sld.namedLayers[layerStyle].userStyles[0])}
>      ));
> I attached the GML and SLD file  :D.
> thanks
> On Thu, Dec 4, 2008 at 12:20 PM, Ivan Grcic <ivan.grcic at geofoto.hr> wrote:
>>
>> Little more info would help...are you talking about WMS layer? that
>> you're serving trough GeoServer or similar? or its about WFS, vector
>> layeR?
>>
>> On Thu, Dec 4, 2008 at 3:12 PM, Ignacio Talavera
>> <ignacio.talavera at gmail.com> wrote:
>> > Hi, I'm trying to highlight a FeatureCollection by applying a SLD
>> > FeatureTypeSytle.
>> > So I wirte an SLD file with two <sld:LineSymbolizer>  elements
>> >      <sld:LineSymbolizer>
>> > <sld:Stroke>
>> > <sld:CssParameter name="stroke">
>> > <ogc:Literal>yellow</ogc:Literal>
>> > </sld:CssParameter>
>> > <sld:CssParameter name="stroke-width">
>> > <ogc:Literal>6</ogc:Literal>
>> > </sld:CssParameter>
>> > <sld:CssParameter name="stroke-opacity">
>> > <ogc:Literal>0.65</ogc:Literal>
>> > </sld:CssParameter>
>> > </sld:Stroke>
>> > </sld:LineSymbolizer>
>> >                                     <sld:LineSymbolizer>
>> > <sld:Stroke>
>> > <sld:CssParameter name="stroke">
>> > <ogc:Literal>blue</ogc:Literal>
>> > </sld:CssParameter>
>> > <sld:CssParameter name="stroke-width">
>> > <ogc:Literal>4</ogc:Literal>
>> > </sld:CssParameter>
>> > <sld:CssParameter name="stroke-dasharray">
>> > <ogc:Literal>5 8</ogc:Literal>
>> > </sld:CssParameter>
>> > </sld:Stroke>
>> > </sld:LineSymbolizer>
>> >  but when OL draw the features its apply the last LineSymbolizer. Any
>> > idea?
>> >
>> >
>> > _______________________________________________
>> > Users mailing list
>> > Users at openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>> >
>>
>>
>>
>> --
>> Ivan Grcic
>
>



-- 
Ivan Grcic



More information about the Users mailing list