[OpenLayers-Users] tile gutters

Tim Schaub noreply at geocartic.com
Wed Jan 10 13:04:22 EST 2007


> 1) Which version of Openlayers do I need to get the "gutter" feature?

Tile gutters are currently only in my sandbox.  I'll make a patch later
today that can be applied to the trunk.  If the feature makes it into a
release, it will likely be 2.4.

> 2) How does it work in detail - does OpenLayers request a 
> tile that is, say, 15 pixels all round bigger than the tile 
> size (i.e. 286x286 pixels instead of 256x256), then only 
> display the middle of the tile?
> Or does it overlap tiles in some way, in which case, in what order?

The former.  Given a tile size of 256 x 256 and a gutter of 15px, a 286 x
286 image is requested.  This image is placed in a "frame" that hides the
outside "gutter" of 15px.  As far as OpenLayers is concerned, this is still
a 256 x 256 tile.

> 3) Is there a limit to the gutter size?  I might need it to 
> be fairly big in my application (say 50 pixels at a guess).

No limit imposed.  You'll be requesting images that are bigger than your
tile size by your gutter size in each direction, so you'll take a
performance hit with bigger gutters.  Also note that if you were to use this
feature with labeled map layers, you'd want to configure the server to add a
label edge buffer equal to your gutter.  (In MapServer this is done with the
elegantly named "labelcache_map_edge_buffer" metadata keyword.)

Specifying a gutter for a layer's tiles involves setting the 'gutter'
property on the layer's options:

    var layer = new OpenLayers.Layer.WMS("Layer Title", 
        "http://host/path",
        {layers: 'layer_name'},
        {gutter: 15});

Tim

> 
> Thanks,
> Jon
> 
> On 1/10/07, Tim Schaub wrote:
> >
> >
> > If anybody is using non-cached WMS layers (or other layer types for 
> > that
> > matter) and is bugged by the tile-edge artifacts, there's a 
> solution:
> > 
> http://dev.openlayers.org/sandbox/tschaub/gutter/examples/gutter.html
> >
> > This is currently only set up for WMS layers, but is easy 
> to extend to 
> > any other layer type for which it makes sense.  If this 
> passes review 
> > by the dev crew, I'll commit it to the trunk.
> >
> > Glad to hear any feedback,
> > Tim
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
> >
> 
> 
> --
> --------------------------------------------------------------
> Dr Jon Blower              Tel: +44 118 378 5213 (direct line)
> Technical Director         Tel: +44 118 378 8741 (ESSC)
> Reading e-Science Centre   Fax: +44 118 378 6413
> ESSC                       Email: jdb at mail.nerc-essc.ac.uk
> University of Reading
> 3 Earley Gate
> Reading RG6 6AL, UK
> --------------------------------------------------------------
> 




More information about the Users mailing list