Hello,

I'm using Geoserver 2.1 on Ubuntu Linux and struggling with the result
of GetLegendGraphic call.

My SLD has and needs only one rule. When I request the legendgraphic
only the symbol without label text (rule name or title) gets rendered.

When I add a dummy rule, I get two items in the legend graphic, each one
with correct label.

I tried to request with &RULE parameter or &SCALE parameter, but I
couldn't find a way to render the label to the symbol.

I did a quick read on the WMS and SLD/SE spec, but I didn't find
anything helpful.

My questions: What am I missing? Why isn't the label rendered to the legend?

I'm only speaking of the legend. The GetMap result is just fine.


Thanks in advance for any help.


Lars


PS:

This is my rule snippet:

        <sld:Rule>
          <sld:Title>building</sld:Title>
          <sld:Name>building</sld:Name>
          <sld:PolygonSymbolizer>
            <sld:Fill>
              <sld:CssParameter name="fill">#ff9f7f</sld:CssParameter>
              <sld:CssParameter name="fill-opacity">0.65</sld:CssParameter>
            </sld:Fill>
            <sld:Stroke>
              <sld:CssParameter name="stroke-width">0.5</sld:CssParameter>
            </sld:Stroke>
          </sld:PolygonSymbolizer>
          <sld:TextSymbolizer>
            <sld:Label>
              <ogc:PropertyName>label</ogc:PropertyName>
            </sld:Label>
         <Font>
           <CssParameter name="font-family">Dialog.plain</CssParameter>
           <CssParameter name="font-size">12</CssParameter>
           <CssParameter name="font-style">normal</CssParameter>
           <CssParameter name="font-weight">bold</CssParameter>
         </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:Rotation>
                  <ogc:Literal>0</ogc:Literal>
                </sld:Rotation>
              </sld:PointPlacement>
            </sld:LabelPlacement>
                     <Halo>
           <Radius>2</Radius>
           <Fill>
             <CssParameter name="fill">#FFFFFF</CssParameter>
           </Fill>
         </Halo>
            <VendorOption name="autoWrap">80</VendorOption>
          </sld:TextSymbolizer>
        </sld:Rule>

If I copy paste this rule (and change the title) I'm getting two items
with label in the legend image.

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to