A few things to try: - remove the halo until you get something on screen - try having only one symbolizer per rule - ensure the TextSymbolizer/Label/PropertyName element references the correct attribute containing your text - fire up a debugger and step through the rendering process to see where it decides to skip the text symbolizer
Cheers, Cory. Fernando Camargo wrote: > Thank you very much for your help. This tutorial is very good for my > future works but I can't find what's the trouble. If you can look at xml > code generated for me. The PolygonSymbolizer it's ok. > > Cory Horner wrote: >> Try outputting your style to XML to ensure that it is correct: >> >> SLDTransformer aTransformer = new SLDTransformer(); >> String xml = aTransformer.transform(style); >> >> You can compare your file to some SLD snippets from the Geoserver SLD >> Intro Tutorial to get an idea of what it should look like to accomplish >> various things. >> >> http://docs.codehaus.org/display/GEOSDOC/SLD+Intro+Tutorial > > <?xml version="1.0" encoding="UTF-8"?><sld:UserStyle > xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" > xmlns:gml="http://www.opengis.net/gml"><sld:Name>Default > Styler</sld:Name><sld:Title>Default > Styler</sld:Title><sld:Abstract/><sld:FeatureTypeStyle><sld:Name>name</sld:Name><sld:Title>title</sld:Title><sld:Abstract>abstract</sld:Abstract><sld:FeatureTypeName>name</sld:FeatureTypeName><sld:SemanticTypeIdentifier>generic:geometry</sld:SemanticTypeIdentifier><sld:Rule><sld:Name>name</sld:Name><sld:Title>title</sld:Title><sld:Abstract>Abstract</sld:Abstract><sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator><sld:PolygonSymbolizer><sld:Stroke><sld:CssParameter > > name="stroke"><ogc:Literal>#000000</ogc:Literal></sld:CssParameter><sld:CssParameter > > name="stroke-linecap"><ogc:Literal>butt</ogc:Literal></sld:CssParameter><sld:CssParameter > > name="stroke-linejoin"><ogc:Literal>miter</ogc:Literal></sld:CssParameter><sld:CssParameter > name= "stroke-opacity"><ogc:Literal>1.0</ogc:Literal></sld:CssParameter><sld:CssParameter name="stroke-width"><ogc:Literal>1.0</ogc:Literal></sld:CssParameter><sld:CssParameter name="stroke-dashoffset"><ogc:Literal>0.0</ogc:Literal></sld:CssParameter></sld:Stroke></sld:PolygonSymbolizer><sld:TextSymbolizer><sld:Label><ogc:PropertyName>name</ogc:PropertyName></sld:Label><sld:Font><sld:CssParameter name="font-family"><ogc:Literal>Arial</ogc:Literal></sld:CssParameter><sld:CssParameter name="font-size"><ogc:Literal>30.0</ogc:Literal></sld:CssParameter><sld:CssParameter name="font-style"><ogc:Literal>normal</ogc:Literal></sld:CssParameter><sld:CssParameter name="font-weight"><ogc:Literal>bold</ogc:Literal></sld:CssParameter></sld:Font><sld:LabelPlacement><sld:PointPlacement><sld:AnchorPoint><sld:AnchorPointX><ogc:Literal>0.0</ogc:Literal></sld:AnchorPointX><sld:AnchorPointY><ogc:Literal>0.5</ogc:Literal></sld:AnchorPointY></sld:AnchorPoint><sld:Displacement><sld:DisplacementX><ogc:Lite ral>0</ogc:Literal></sld:DisplacementX><sld:DisplacementY><ogc:Literal>0</ogc:Literal></sld:DisplacementY></sld:Displacement><sld:Rotation><ogc:Literal>0</ogc:Literal></sld:Rotation></sld:PointPlacement></sld:LabelPlacement><sld:Halo><sld:Radius><ogc:Literal>2.0</ogc:Literal></sld:Radius><sld:Fill><sld:CssParameter name="fill"><ogc:Literal>#FFFFFF</ogc:Literal></sld:CssParameter><sld:CssParameter name="fill-opacity"><ogc:Literal>1.0</ogc:Literal></sld:CssParameter></sld:Fill></sld:Halo><sld:Fill><sld:CssParameter name="fill"><ogc:Literal>#000000</ogc:Literal></sld:CssParameter><sld:CssParameter name="fill-opacity"><ogc:Literal>1.0</ogc:Literal></sld:CssParameter></sld:Fill></sld:TextSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle> ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
