Hi, I've got a SLD that I apply to a polygon layer and I want to add a label to identify those polygons. I manage to add the the labels but my problem is that the labels are repeated a lot of times into the polygons and furthermore they don't appear on the centroif of my polygon. Here is my TextSymbolizer tag: <TextSymbolizer> <sld:MinScaleDenominator>3000</sld:MinScaleDenominator> <sld:MaxScaleDenominator>5000</sld:MaxScaleDenominator> <Label> <ogc:PropertyName>MUNICIPIO</ogc:PropertyName> </Label> <Font> <CssParameter name="font-family">Arial</CssParameter> <CssParameter name="font-weight">bold</CssParameter> <CssParameter name="font-size">8</CssParameter> </Font> <!-- this centers the label on the polygon's centroid--> <LabelPlacement> <PointPlacement> <AnchorPoint> <AnchorPointX>0.5</AnchorPointX> <AnchorPointY>0.5</AnchorPointY> </AnchorPoint> </PointPlacement> </LabelPlacement> <!-- make the label easy to read--> <Halo> <Radius> <ogc:Literal>2</ogc:Literal> </Radius> <Fill> <CssParameter name="fill">#FFFFFF</CssParameter> <CssParameter name="fill-opacity">0.85</CssParameter> </Fill> </Halo> <Fill> <CssParameter name="fill">#000000</CssParameter> </Fill> <!-- This labels each name only once, not every shape with that name --> <VendorOption name="group">true</VendorOption> </TextSymbolizer>
Un saludo, ·················································································· David Alda Fernández de Lezea Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad IKT Granja Modelo s/n · 01192 · Arkaute (Araba) ·················································································· Tlfnos.: 945-00-32-95 Fax: 945-00.32.90 ·················································································· email: da...@ikt.es web: www.ikt.es <http://www.ikt.es/> ··················································································
<<logo.gif>>
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users