Hi all,
I have a postgis layer that I should labeling taking “css parameter” from some attribute values. I mean font-family, dimension and angle.
Can I achieve this goal?
thanks in advance
Michele
Hi all,
I have a postgis layer that I should labeling taking “css parameter” from some attribute values. I mean font-family, dimension and angle.
Can I achieve this goal?
thanks in advance
Michele
Hi Michele,
yes this should be possible, look at the ogc:PropertyNames tags in this SLD snippet:
sld:MaxScaleDenominator5000.0</sld:MaxScaleDenominator>
ogc:PropertyNamenr</ogc:PropertyName>
</sld:Label>
<sld:CssParameter name=“font-family”>VialogRegular</sld:CssParameter>
<sld:CssParameter name=“font-size”> ogc:PropertyNamesize</ogc:PropertyName> </sld:CssParameter>
<sld:CssParameter name=“font-style”>italic</sld:CssParameter>
<sld:CssParameter name=“font-weight”>normal</sld:CssParameter>
</sld:Font>
ogc:Literal0.5</ogc:Literal>
</sld:AnchorPointX>
ogc:Literal0.5</ogc:Literal>
</sld:AnchorPointY>
</sld:AnchorPoint>
ogc:PropertyNamerotation</ogc:PropertyName>
</sld:Rotation>
</sld:PointPlacement>
</sld:LabelPlacement>
Kind regards,
Sebastian
I have a postgis layer that I should labeling taking “css parameter” from some attribute values. I mean font-family, dimension and angle.
Can I achieve this goal?
thanks in advance
Michele
Hi Sebastian,
thank you very much for your answer. Thi solution work fine for me
cheers
Michele
On Mon, Dec 3, 2012 at 4:53 PM, <Schmidt.Sebastian2@anonymised.com> wrote:
Hi Michele,
yes this should be possible, look at the ogc:PropertyNames tags in this SLD snippet:
sld:MaxScaleDenominator5000.0</sld:MaxScaleDenominator>
ogc:PropertyNamenr</ogc:PropertyName>
</sld:Label>
<sld:CssParameter name=“font-family”>VialogRegular</sld:CssParameter>
<sld:CssParameter name=“font-size”> ogc:PropertyNamesize</ogc:PropertyName> </sld:CssParameter>
<sld:CssParameter name=“font-style”>italic</sld:CssParameter>
<sld:CssParameter name=“font-weight”>normal</sld:CssParameter>
</sld:Font>
ogc:Literal0.5</ogc:Literal>
</sld:AnchorPointX>
ogc:Literal0.5</ogc:Literal>
</sld:AnchorPointY>
</sld:AnchorPoint>
ogc:PropertyNamerotation</ogc:PropertyName>
</sld:Rotation>
</sld:PointPlacement>
</sld:LabelPlacement>
Kind regards,
Sebastian
Von: Michele Beneventi [mailto:mbeneventi@anonymised.com]
Gesendet: Montag, 3. Dezember 2012 16:43
An: geoserver-users
Betreff: [Geoserver-users] Labeling - ‘css parameter’ value from attribute fieldHi all,
I have a postgis layer that I should labeling taking “css parameter” from some attribute values. I mean font-family, dimension and angle.
Can I achieve this goal?
thanks in advance
Michele