Bram,

Just wondering whether you are using a tiled map service to incorporate the map 
in your website? If a polygon or line crosses multiple tiles, the label is 
drawn on both tiles.

Also, what's the nature of your data? In order to label polygons, I typically 
determine a center point for the polygon in PostGIS that I later use to label 
the polygons. In this way, there's only one point that's labeled.

For lines, check out the parameters

<VendorOption name="spaceAround">
<VendorOption name="labelAllGroup">
<VendorOption name="repeat">

to adjust the repetition of labels and avoid collisions. 

Regards,

Edward


Date: Mon, 7 Nov 2011 09:21:10 +0100
From: [email protected]
To: [email protected]
Subject: [Geoserver-users] labels are occuring more than once





Hi, I'm running into a problem I cannot solve. I want to display labels of my 
features (polygons, lines and points) when zoomed in. In the documentation I 
see that normally every feature will be labeled once. But when I zoom in, most 
of my polygons and lines display the label more than once. The further I zoom 
in, the more labels it displays (of the same polygon or line).The preview of 
geoserver is doing it correctly, but when I load my features on my site it goes 
wrong.What am I doing wrong?  Here's my SLD code of the label, maybe there's 
something in there     <FeatureTypeStyle>
    <Rule>
      <Name>Label</Name>
      <MaxScaleDenominator>10000</MaxScaleDenominator> 
        <TextSymbolizer>
          <Label>
          <PropertyName xmlns="http://www.opengis.net/ogc";>code</PropertyName>
          </Label>
          <LabelPlacement>
          <PointPlacement>
            <AnchorPoint>
            <AnchorPointX>0</AnchorPointX>
            <AnchorPointY>0</AnchorPointY>
            </AnchorPoint>
          </PointPlacement>
          </LabelPlacement>
          <VendorOption name="group">yes</VendorOption>
        </TextSymbolizer>
    </Rule>
    </FeatureTypeStyle>  Thanks! Bram 

__________ Informatie van ESET NOD32 Antivirus, versie van database 
viruskenmerken 6606 (20111106) __________

Het bericht is gecontroleerd door  ESET NOD32 Antivirus.

http://www.eset.com
 
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users                    
                  
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to