[Geoserver-users] Add label

I have renerated SLD file from QGIS, using opengeosuite, I want to add label for my layer, for that I addded oragne color highlighed lines by refering the tutorial, I modified the field name ‘tot_popu’. I saved the file, i uploaded as newstyle in geoserver, but not working. It shows red color highlighd error. please help me. i am not a programmer.

</se:PolygonSymbolizer>
</se:Rule>
se:Rule
se:TextSymbolizer

ogc:PropertyNametot_popu</ogc:PropertyName>


Arial
11
normal
bold




0.5
0.5




#000000

60
150
</se:TextSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>


You need to use the prefix se: on your new elements in the same way the rest of the document does

Ian

On 20/08/15 09:24, Iyappan Lakshmanan wrote:

I have renerated SLD file from QGIS, using opengeosuite, I want to add
label for my layer, for that I addded oragne color highlighed lines by
refering the tutorial, I modified the field name 'tot_popu'. I saved the
file, i uploaded as newstyle in geoserver, but not working. It shows red
color highlighd error. please help me. i am not a programmer.

  </se:PolygonSymbolizer>
  </se:Rule>
  <se:Rule>
  <se:TextSymbolizer>
<Label>
<ogc:PropertyName>tot_popu</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">11</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
<VendorOption name="autoWrap">60</VendorOption>
<VendorOption name="maxDisplacement">150</VendorOption>
  </se:TextSymbolizer>
</se:Rule>
       </se:FeatureTypeStyle>
     </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

  * line 290: cvc-complex-type.2.4.a: Invalid content was found starting
    with element 'Label'. One of '{"http://www.opengis.net/se&quot;:Name,
    "http://www.opengis.net/se&quot;:Description,
    "http://www.opengis.net/se&quot;:BaseSymbolizer,
    "http://www.opengis.net/se&quot;:Geometry,
    "http://www.opengis.net/se&quot;:Label, "http://www.opengis.net/se&quot;:Font,
    "http://www.opengis.net/se&quot;:LabelPlacement,
    "http://www.opengis.net/se&quot;:Halo, "http://www.opengis.net/se&quot;:Fill,
    "http://www.opengis.net/se&quot;:Priority,
    "http://www.opengis.net/se&quot;:VendorOption\}' is expected.

------------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
geoserver-users List Signup and Options

The same answer, as the error message says it is expecting se:SvgParameter next.

Ian

On 20/08/15 10:33, Iyappan Lakshmanan wrote:

Dear Sir
                 Thank you very much, i tired, Previously I put, Css,
not working, then i changed into Svg, now it is coming like that.

<SvgParameter name="font-family">Arial</SvgParameter>
<SvgParameter name="font-size">11</SvgParameter>
<SvgParameter name="font-style">normal</SvgParameter>
<SvgParameter name="font-weight">bold</SvgParameter>

  * line 294: cvc-complex-type.2.4.a: Invalid content was found starting
    with element 'SvgParameter'. One of
    '{"http://www.opengis.net/se&quot;:SvgParameter\}' is expected.
  * line 302: cvc-complex-type.2.4.a: Invalid content was found starting
    with element 'AnchorPointX'. One of
    '{"http://www.opengis.net/se&quot;:AnchorPointX\}' is expected.
  * line 308: cvc-complex-type.2.4.a: Invalid content was found starting
    with element 'CssParameter'. One of
    '{"http://www.opengis.net/se&quot;:GraphicFill,
    "http://www.opengis.net/se&quot;:SvgParameter\}' is expected.
  * line 310: cvc-complex-type.2.4.a: Invalid content was found starting
    with element 'VendorOption'. One of
    '{"http://www.opengis.net/se&quot;:Priority,
    "http://www.opengis.net/se&quot;:VendorOption\}' is expected.

On Thu, Aug 20, 2015 at 2:47 PM, Ian Turton <ijturton@anonymised.com
<mailto:ijturton@anonymised.com>> wrote:

    You need to use the prefix se: on your new elements in the same way
    the rest of the document does

    Ian

    On 20/08/15 09:24, Iyappan Lakshmanan wrote:

        I have renerated SLD file from QGIS, using opengeosuite, I want
        to add
        label for my layer, for that I addded oragne color highlighed
        lines by
        refering the tutorial, I modified the field name 'tot_popu'. I
        saved the
        file, i uploaded as newstyle in geoserver, but not working. It
        shows red
        color highlighd error. please help me. i am not a programmer.

           </se:PolygonSymbolizer>
           </se:Rule>
           <se:Rule>
           <se:TextSymbolizer>
        <Label>
        <ogc:PropertyName>tot_popu</ogc:PropertyName>
        </Label>
        <Font>
        <CssParameter name="font-family">Arial</CssParameter>
        <CssParameter name="font-size">11</CssParameter>
        <CssParameter name="font-style">normal</CssParameter>
        <CssParameter name="font-weight">bold</CssParameter>
        </Font>
        <LabelPlacement>
        <PointPlacement>
        <AnchorPoint>
        <AnchorPointX>0.5</AnchorPointX>
        <AnchorPointY>0.5</AnchorPointY>
        </AnchorPoint>
        </PointPlacement>
        </LabelPlacement>
        <Fill>
        <CssParameter name="fill">#000000</CssParameter>
        </Fill>
        <VendorOption name="autoWrap">60</VendorOption>
        <VendorOption name="maxDisplacement">150</VendorOption>
           </se:TextSymbolizer>
        </se:Rule>
                </se:FeatureTypeStyle>
              </UserStyle>
            </NamedLayer>
        </StyledLayerDescriptor>

           * line 290: cvc-complex-type.2.4.a: Invalid content was found
        starting
             with element 'Label'. One of
        '{"http://www.opengis.net/se&quot;:Name,
             "http://www.opengis.net/se&quot;:Description,
             "http://www.opengis.net/se&quot;:BaseSymbolizer,
             "http://www.opengis.net/se&quot;:Geometry,
             "http://www.opengis.net/se&quot;:Label,
        "http://www.opengis.net/se&quot;:Font,
             "http://www.opengis.net/se&quot;:LabelPlacement,
             "http://www.opengis.net/se&quot;:Halo,
        "http://www.opengis.net/se&quot;:Fill,
             "http://www.opengis.net/se&quot;:Priority,
             "http://www.opengis.net/se&quot;:VendorOption\}' is expected.

        ------------------------------------------------------------------------------

        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        geoserver-users List Signup and Options