|
From: Ricardo B. <ric...@gm...> - 2010-07-16 17:31:09
|
Thanks Andy, I was thinking a similar approach using Filter Functions using the centroid. It says "Returns the centroid of the geometry. Can be often used as a label point for polygons, though there is no guarantee it will actually lie inside the geometry" http://docs.geoserver.org/stable/en/user/filter/function_reference.html <http://docs.geoserver.org/stable/en/user/filter/function_reference.html>I was hoping for a better approach. Does anybody know why GS labels more than once the same object/feature ? Regards On Fri, Jul 16, 2010 at 1:56 PM, Andy Norman <an...@no...> wrote: > On 16/07/2010 16:54, Ricardo Bayley wrote: > > I am labeling polygons. When zoomed in, labels for the same polygon > > get repeated inside the polygon. > > Is there a way of setting that each polygon sould be labeled once ? > > I thought that the maxDisplacement vendor option would be a good > > approach, but polygon is still being labeled more than once. > I had that problem as well. I resolved it by adding a view to the > database that returned a point for the centroid of the polygons I needed > to label. > > Then I labelled those points instead. > > No doubt there is a better way to achieve it, but that worked for me. > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Geoserver-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geoserver-users > |