Ticket #529 (closed feature: fixed)

Opened 6 years ago

Last modified 6 years ago

allow tiles to have gutters

Reported by: tschaub Owned by: tschaub
Priority: minor Milestone: 2.4 Release
Component: general Version:
Keywords: Cc:
State:

Description

The problem: not all servers render well at tile edges.

The solution: let the client (optionally) disregard tile edges.

An example:  http://dev.openlayers.org/sandbox/tschaub/gutter/examples/gutter.html

Attachments

gutter.patch Download (15.6 KB) - added by tschaub 6 years ago.
gives tiles gutters
gutter.2.patch Download (23.5 KB) - added by tschaub 6 years ago.
better gutter patch
gutter.3.patch Download (57.5 KB) - added by tschaub 6 years ago.
best gutter patch
gutter.3.2.patch Download (57.0 KB) - added by sderle 6 years ago.
gutter.3.patch with fixed line endings

Change History

Changed 6 years ago by tschaub

The following patch allows tile gutters on WMS layers. It doesn't particularly make sense to add this functionality to other layer types (with the exception of the mapserver layer) because it results in overlapping image requests (so it cannot be used with TileCache, TMS, ka-Map, commercial layers, or any other source that only allows for requests on a regular lattice).

However, it is a nice feature for WMS layers. It does require changes outside of Layer/WMS.js. The general idea is that with this patch, all tiles now have a frame. This frame is absolutely positioned and hides overflow. The actual image sits inside this frame, is relatively positioned, and given non-zero gutters will be larger than the tile frame.

The patch comes with an example (gutter.html) and a few tests in Tile/Image and Layer/WMS.

I think it would make a nice addition to 2.4.

Changed 6 years ago by tschaub

gives tiles gutters

Changed 6 years ago by tschaub

Please review. Note that this includes a fix for #557.

Changed 6 years ago by tschaub

  • keywords review added

Changed 6 years ago by crschmidt

  • milestone changed from 2.5 Release to 2.4 Release

Changed 6 years ago by tschaub

  • keywords review removed

I'm going to upgrade this patch before we decide whether or not it should make it in.

Changed 6 years ago by crschmidt

  • milestone changed from 2.4 Release to 2.5 Release

Kicking back over to 2.5, since the last bug for 2.4 is about to be closed.

Changed 6 years ago by tschaub

better gutter patch

Changed 6 years ago by tschaub

  • keywords review added
  • milestone changed from 2.5 Release to 2.4 Release

Ok, I like this one better. WMS and MapServer layers get gutter functionality. This is easy to extend to any other layers. Tests included. See  http://dev.openlayers.org/sandbox/tschaub/gutter/examples/gutter.html for an example.

A few notes:

1) Tests will not pass (and things will not work) unless the patch for #616 is accepted first. This also means that for any layers using Tile.Image, layer.tileSize or map.getTileSize() must return a sensible value. For untiled layers, layer.tileSize was null and map.getTileSize() returned the 256x256 default. Since these layers use Tile.Image, I think it makes sense that they set their own tileSize.

2) This patch fixes #557

Will commit if this receives a favorable review.

Changed 6 years ago by sderle

  • keywords commit added; review removed

This code looks fine to me. Once #616 is resolved, please commit this patch.

Changed 6 years ago by tschaub

  • keywords commit removed

Ok, final patch (fingers crossed). There were issues with the above patch and untiled layers. This patch creates a setTileSize on all layers. This method not only sets layer.tileSize, it also sets layer.imageSize and layer.imageOffset. These are used by Tile.Image. The untiled layers need to setTileSize in a different way - and more frequently. They define their own setTileSize which bases the calculation on the map viewport size. I think things will be easier to maintain this way.

In addition to the aforementioned gutter.html example, see:

1)  mapserver.html with gutters

2)  mapserver_untiled.html without gutters

3)  wms-untiled.html without gutters

Please review gutter.3.patch. Will commit if it looks good.

Changed 6 years ago by tschaub

best gutter patch

Changed 6 years ago by tschaub

  • keywords review added

por favor

Changed 6 years ago by sderle

gutter.3.patch with fixed line endings

Changed 6 years ago by sderle

I just uploaded gutter.3.2.patch, which fixes the line ending issue that was breaking patch(1) on my end. All the tests seem to pass on my end, so go ahead and check it in.

Changed 6 years ago by sderle

  • keywords commit added; review removed

Changed 6 years ago by tschaub

  • keywords commit removed
  • status changed from new to closed
  • resolution set to fixed

resolved in r2979

Note: See TracTickets for help on using tickets.