I think you are going to have to ask you question a bit more specifically to get an answer on this list! I think what you are saying is that the text symbolizer is only drawn if there is also a polygon symbolizer?
Jody On 20/05/2010, at 10:03 PM, GuiCheBZH wrote: > > Hi, > I have a SLD file like that, but when I parse the file, it doesn't display > the text symbolizer. > > <?xml version="1.0" encoding="UTF-8"?> > <sld:UserStyle xmlns="http://www.opengis.net/sld" > 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/> > <sld:FeatureTypeStyle> > <sld:Name>name</sld:Name> > <sld:Rule> > <ogc:Filter> > <ogc:FeatureId fid="toto.1"/> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Stroke/> > </sld:PolygonSymbolizer> > </sld:Rule> > </sld:FeatureTypeStyle> > <sld:FeatureTypeStyle> > <sld:Name>name</sld:Name> > <sld:Rule> > <ogc:Filter> > <ogc:FeatureId fid="toto.1"/> > </ogc:Filter> > <sld:MaxScaleDenominator>7.0</sld:MaxScaleDenominator> > <sld:TextSymbolizer> > <sld:Label> > <ogc:Literal>Toto</ogc:Literal> > </sld:Label> > <sld:Font> > <sld:CssParameter > name="font-family">Arial</sld:CssParameter> > <sld:CssParameter > name="font-size">11</sld:CssParameter> > <sld:CssParameter > name="font-style">normal</sld:CssParameter> > <sld:CssParameter > name="font-weight">bold</sld:CssParameter> > </sld:Font> > <sld:LabelPlacement> > <sld:PointPlacement> > <sld:AnchorPoint> > <sld:AnchorPointX> > > <ogc:Literal>0.5</ogc:Literal> > </sld:AnchorPointX> > <sld:AnchorPointY> > > <ogc:Literal>0</ogc:Literal> > </sld:AnchorPointY> > </sld:AnchorPoint> > </sld:PointPlacement> > </sld:LabelPlacement> > <sld:Halo> > <sld:Radius> > <ogc:Literal>0</ogc:Literal> > </sld:Radius> > <sld:Fill> > <sld:CssParameter > name="fill">3</sld:CssParameter> > <sld:CssParameter > name="fill-opacity">0</sld:CssParameter> > </sld:Fill> > </sld:Halo> > <sld:Fill> > <sld:CssParameter > name="fill">#000000</sld:CssParameter> > </sld:Fill> > </sld:TextSymbolizer> > </sld:Rule> > </sld:FeatureTypeStyle> > </sld:UserStyle> > > But if I modify the SLD file like that, it works well.: > > <?xml version="1.0" encoding="UTF-8"?> > <sld:UserStyle xmlns="http://www.opengis.net/sld" > 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/> > <sld:FeatureTypeStyle> > <sld:Name>name</sld:Name> > <sld:Rule> > <ogc:Filter> > <ogc:FeatureId fid="toto.1"/> > </ogc:Filter> > <sld:PolygonSymbolizer> > <sld:Stroke/> > </sld:PolygonSymbolizer> > <sld:TextSymbolizer> > <sld:Label> > <ogc:Literal>Toto</ogc:Literal> > </sld:Label> > <sld:Font> > <sld:CssParameter > name="font-family">Arial</sld:CssParameter> > <sld:CssParameter > name="font-size">11</sld:CssParameter> > <sld:CssParameter > name="font-style">normal</sld:CssParameter> > <sld:CssParameter > name="font-weight">bold</sld:CssParameter> > </sld:Font> > <sld:LabelPlacement> > <sld:PointPlacement> > <sld:AnchorPoint> > <sld:AnchorPointX> > > <ogc:Literal>0.5</ogc:Literal> > </sld:AnchorPointX> > <sld:AnchorPointY> > > <ogc:Literal>0</ogc:Literal> > </sld:AnchorPointY> > </sld:AnchorPoint> > </sld:PointPlacement> > </sld:LabelPlacement> > <sld:Halo> > <sld:Radius> > <ogc:Literal>0</ogc:Literal> > </sld:Radius> > <sld:Fill> > <sld:CssParameter > name="fill">3</sld:CssParameter> > <sld:CssParameter > name="fill-opacity">0</sld:CssParameter> > </sld:Fill> > </sld:Halo> > <sld:Fill> > <sld:CssParameter > name="fill">#000000</sld:CssParameter> > </sld:Fill> > </sld:TextSymbolizer> > </sld:Rule> > </sld:FeatureTypeStyle> > </sld:UserStyle> > > Is there a way to get the first solution working? > Thanks. > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/SLD-and-TextSymbolizer-tp5079316p5079316.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
