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:CssParameter name="fill">#1B1818</sld:CssParameter>
          <sld:CssParameter name="fill-opacity">0.4</sld:CssParameter>
          <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>
          <ogc:Function name="centroid">
          <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:CssParameter name="fill">#FFFFFF</sld:CssParameter>
              <sld:CssParameter name="fill-opacity">0.78</sld:CssParameter>
          <sld:CssParameter name="fill">#0616F6</sld:CssParameter>
        <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>
  • 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.