1

I use geoserver and OL3 to display one layer. I have configured my sld in order to show labels after a specific zoom level. It works quite well but there is one specific polygon that doesn't show the label at a specific zoom level (see attachment - upper left). All the others seem to work fine.

It doesn't seem to be a problem of overlapping or tiled layers. Any ideas?enter image description here

This is how my SLD rule looks like:

<sld:Rule>
      <sld:Name>rule1</sld:Name>
      <sld:Title>Grid</sld:Title>
      <sld:MaxScaleDenominator>1701630</sld:MaxScaleDenominator>
      <sld:PolygonSymbolizer>
        <sld:Fill>
          <sld:CssParameter name="fill">#1B1818</sld:CssParameter>
          <sld:CssParameter name="fill-opacity">0.4</sld:CssParameter>
        </sld:Fill>
        <sld:Stroke>
          <sld:CssParameter name="stroke">#0000FF</sld:CssParameter>
          <sld:CssParameter name="stroke-opacity">0.9</sld:CssParameter>
          <sld:CssParameter name="stroke-width">1.2</sld:CssParameter>
        </sld:Stroke>
      </sld:PolygonSymbolizer>
      <sld:TextSymbolizer>
        <Geometry>
          <ogc:Function name="centroid">
            <ogc:PropertyName>shape</ogc:PropertyName>
          </ogc:Function>
        </Geometry>
        <sld:Label>
          <ogc:PropertyName>map_code</ogc:PropertyName>
        </sld:Label>
        <sld:Font>
          <sld:CssParameter name="font-family">Arial</sld:CssParameter>
          <sld:CssParameter name="font-size">12</sld:CssParameter>
          <sld:CssParameter name="font-style">normal</sld:CssParameter>
          <sld:CssParameter name="font-weight">normal</sld:CssParameter>
          </sld:Font>
        <sld:LabelPlacement>
          <sld:PointPlacement>
            <sld:AnchorPoint>
              <sld:AnchorPointX>0.5</sld:AnchorPointX>
              <sld:AnchorPointY>0.5</sld:AnchorPointY>
            </sld:AnchorPoint>
          </sld:PointPlacement>
        </sld:LabelPlacement>
        <sld:Halo>
          <sld:Radius>0.5</sld:Radius>
            <sld:Fill>
              <sld:CssParameter name="fill">#FFFFFF</sld:CssParameter>
              <sld:CssParameter name="fill-opacity">0.78</sld:CssParameter>
            </sld:Fill>
        </sld:Halo>
        <sld:Fill>
          <sld:CssParameter name="fill">#0616F6</sld:CssParameter>
        </sld:Fill>
        <sld:VendorOption name="goodnessOfFit">0.3</sld:VendorOption>
        <sld:VendorOption name="spaceAround">-10</sld:VendorOption>
        <sld:VendorOption name="conflictResolution">false</sld:VendorOption>
        <sld:VendorOption name="partials">true</sld:VendorOption>
        <sld:VendorOption name="charSpacing">23</sld:VendorOption>
      </sld:TextSymbolizer>
    </sld:Rule>
  • are you sure it has a label value? – Ian Turton Nov 14 '17 at 10:48
  • Yes. Cause when I zoom in one more level then I get it! – user1919 Nov 14 '17 at 10:57
  • I see you have partial on, but does it happen to cross a tile boundary there? – Ian Turton Nov 14 '17 at 11:16
  • Hmm actually partial on doesn't change something in that case. I am using a old geoserver (2.5) which is coupled with other applications. Maybe this is part of the issue. – user1919 Nov 14 '17 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.