4

I am facing display problem in SLD. Working on GeoServer 2.8 and OpenLayers 3.

I have one polygon layer in which I am applying SLD, when I view it in my web application polygon number is repeating each times and when I use centroid function it resolves.

But when I update SLD then that "centroid code" part vanishes from entire code.

  • attached screenshot with this (repeated questions highlighted in red circle) screenshot

  • searching on Google also

code link is: https://jsfiddle.net/5f84nwwj/

Update:updating SLD using Geoexplorer

please check the screenshot

enter image description here

3
  • How are you doing the update? – Ian Turton Jan 14 '16 at 12:29
  • updating new features as required – Vaishali Jan 14 '16 at 12:49
  • how exactly are you updating the SLD file? are you using the GUI or REST? – Ian Turton Jan 14 '16 at 18:23
2

I solve this option using VendorOption

<sld:VendorOption name="polygonAlign">mbr</sld:VendorOption>
        <sld:VendorOption name="goodnessOfFit">0.3</sld:VendorOption>
        <sld:VendorOption name="partials">true</sld:VendorOption> -->

        <sld:VendorOption name="autoWrap">80</sld:VendorOption>
       <sld:VendorOption name="spaceAround">10</sld:VendorOption>
        <sld:VendorOption name="maxDisplacement">100</sld:VendorOption>
        <sld:VendorOption name="polygonAlign">ortho</sld:VendorOption>
        <sld:VendorOption name="goodnessOfFit">0.3</sld:VendorOption>
        <sld:VendorOption name="partials">true</sld:VendorOption>
        <sld:VendorOption name="conflictResolution">false</sld:VendorOption>

enter image description here

after applying sld to layer, then problem is solved.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.