Hi,

What client do you use? Even if your service is not tiled the client can still 
make tiled, typically 256x256 sized requests.

-Jukka Rahkonen-
Bram van Rooij  wrote:

Edward,

I'm not using a tiled map service. So that can't be it.

How do you label your polygon based on your centerpoint? Because that would be 
fine for now (at least an improvement to what I have now).
But I thought Geoserver would do that automatically. Well, maybe not the 
centerpoint, but only one label per polygon. And the same for lines.
Weird thing is that the layer preview of geoserver doesn't duplicate the 
labels. That's what really puzzles me...

I will look into the spacearound option (the other ones I checked out already, 
but didn't help).

If I can't get a solution, I will convert my lines and polygons to points and 
add these to geoserver as separate layers. And use this to label the original 
data. But as far as datamanagement goes, this is not a very attractive 
solution...

Regards
Bram




-----Oorspronkelijk bericht-----
Van: Edward Mac Gillavry [mailto:[email protected]]
Verzonden: ma 07/11/2011 11:45
Aan: Bram van Rooij; [email protected]
Onderwerp: RE: [Geoserver-users] labels are occuring more than once


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