I've developed a simple web map using GeoServer and OpenLayers in WMS format. The styles are created in Geoserver using SLD and send image tiles to the client. In order to display a point layer, I've used PointSymbolizer and external graphics which shown properly on the map. The problem is the there is not any VendorOptions to control icon overlapping and some points close to each other are drawn on top of each other as shown in the picture.

enter image description here

The following is the of SLD for the point icons. How can make icons to not overlap with each other (the SpaceAround is not the option).

  <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
        <!--Plain SVG fallback, no parameters-->
            <se:OnlineResource xlink:href="poi_new_cats/fuel-day.png" xlink:type="simple"/>
        <!--Well known marker fallback-->
                <se:SvgParameter name="fill">#000000</se:SvgParameter>
                <se:SvgParameter name="stroke">#ffffff</se:SvgParameter>
                <se:SvgParameter name="stroke-width">0.5</se:SvgParameter>
   <se:VendorOption name="labelObstacle">true</se:VendorOption>
  • You can't point icons are designed to be drawn no matter what - your only option is to not draw some or all of them until the user has zoomed in enough that they don't overlap
    – Ian Turton
    Apr 8, 2020 at 12:39
  • Thank @IanTurton, but I think it's not possible because in a layer with the same attribute you don't have any option to control the draw of them. Apr 8, 2020 at 12:49
  • Hi all, I have the same problem. The fact is that my points are in the same exact geographical position. @IanTurton, I've seen that someone (like uMap if I'm not wrong) solved this by exploding icons when clicking on the point.. I was wondering if this is possible in an SLD Jun 16, 2022 at 8:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.