|
From: David W. <dwi...@op...> - 2010-07-16 18:31:53
|
Metatiling (rendering several tiles at once in one large tile, and then cropping as appropriate for individual tile requests) is a half-way point between "massive tiles" and "repeated labels". GeoServer provides 3x3 metatiling (with a little configuration on the OpenLayers side); GeoWebCache can do more configurable metatiling. http://docs.geoserver.org/stable/en/user/services/wms/vendor.html?highlight=metatile#tiled http://geowebcache.net/trac/wiki/metatiles -- David Winslow OpenGeo - http://opengeo.org/ On 07/16/2010 02:24 PM, Ricardo Bayley wrote: > Thanks David, that´s exactly the kind of explanation I was looking for. > It makes perfect sense. I did not realize that before. > > I guess Andy´s workaround is not only the best solution, but the only > logical solution. Right ? > > > Thanks > > On Fri, Jul 16, 2010 at 3:00 PM, David Winslow <dwi...@op... > <mailto:dwi...@op...>> wrote: > > GeoServer only takes into account the current viewing area when > rendering. OpenLayers, by default, loads up a map by fetching > lots of 256x256 pixel tiles, rather than asking geoserver to > render a lot of area you've already fetched when you pan just a > little bit. If you set your OpenLayers or other map client to > "untiled" mode, then you will never see repeated labels. This > will keep your browser from being able to cache tiles and such, > though, so expect a higher load on GeoServer as a result. > > -- > David Winslow > OpenGeo - http://opengeo.org/ > > > On 07/16/2010 01:31 PM, Ricardo Bayley wrote: >> 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 >> >> 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... >> <mailto: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://sprint.com/first> -- >> http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> Geoserver-users mailing list >> Geo...@li... >> <mailto:Geo...@li...> >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visitsprint.com/first <http://sprint.com/first> -- http://p.sf.net/sfu/sprint-com-first >> >> >> _______________________________________________ >> Geoserver-users mailing list >> Geo...@li... <mailto:Geo...@li...> >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > > |