[OpenLayers-Users] SLD file and labels

Zer hcan at hotmail.com
Fri Aug 22 15:11:23 EDT 2008


Hello all,

Does anyone know if there has been any progress in this case? Would be a
nice feature!

Thanks,

-Z


Tim Schaub-3 wrote:
> 
> Hey-
> 
> hcan-hcan wrote:
>> Hi!
>> 
>> I'm using the label examples from camptocamp's sandbox
>> (vectors-with-text).
>> Works just fine! Now I have started to  create some themes using and  SLD
>> xml file, the same way as in the Styled Layer Descriptor (SLD) Example.
>> Is
>> there a way to get the labels working using an SLD file? What I had in
>> mind
>> was something like this:
>> 
>> <sld:CssParameter name="label">
>> 	<ogc:Literal>name: ${name}</ogc:Literal>
>> </sld:CssParameter>
>> <sld:CssParameter name="fontColor">
>> 	<ogc:Literal>red</ogc:Literal>
>> </sld:CssParameter>
>> <sld:CssParameter name="fontWeight">
>> 	<ogc:Literal>bold</ogc:Literal>
>> </sld:CssParameter>
>> 
> 
> The SLD spec includes an sld:TextSymbolizer element.  This element has 
> optional children sld:Font, sld:Label, and sld:Fill - all of which are 
> supported (in the writers) as of
> http://trac.openlayers.org/changeset/7333.
> 
> If the SLD parser is given a symbolizer keyed by 'Text', it will write 
> an sld:TextSymbolizer element.
> 
> In OpenLayers a text symbolizer should have the following properties:
> label, fontFamily, fontSize, fillColor, fillOpacity
> (We can add in support for fontStyle and fontWeight.)
> 
> It would be great to get the vectors labeling stuff in the trunk - and 
> we should make sure we're following the same conventions for describing 
> a text symbolizer.
> 
> Tim
> 
>> However, I could not get it working. Does anyone know if this is
>> possible?
>> Or has another solution...
>> 
>> Thanks,
>> 
>> //H
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/SLD-file-and-labels-tp18346791p19113813.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list