OpenLayers OpenLayers

Ticket #529 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

allow tiles to have gutters

Reported by: tschaub Assigned to: 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 (15.6 kB) - added by tschaub on 03/23/07 17:38:10.
gives tiles gutters
gutter.2.patch (23.5 kB) - added by tschaub on 04/02/07 02:03:53.
better gutter patch
gutter.3.patch (57.5 kB) - added by tschaub on 04/02/07 11:53:35.
best gutter patch
gutter.3.2.patch (57.0 kB) - added by sderle on 04/02/07 12:49:27.
gutter.3.patch with fixed line endings

Change History

03/23/07 17:37:44 changed 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.

03/23/07 17:38:10 changed by tschaub

  • attachment gutter.patch added.

gives tiles gutters

03/23/07 17:41:05 changed by tschaub

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

03/23/07 17:41:50 changed by tschaub

  • keywords set to review.

03/31/07 12:23:19 changed by crschmidt

  • milestone changed from 2.5 Release to 2.4 Release.

03/31/07 16:12:16 changed by tschaub

  • keywords deleted.

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

04/01/07 19:59:29 changed 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.

04/02/07 02:03:53 changed by tschaub

  • attachment gutter.2.patch added.

better gutter patch

04/02/07 02:16:34 changed by tschaub

  • keywords set to review.
  • 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.

04/02/07 09:57:11 changed by sderle

  • keywords changed from review to commit.

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

04/02/07 11:52:56 changed by tschaub

  • keywords deleted.

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.

04/02/07 11:53:35 changed by tschaub

  • attachment gutter.3.patch added.

best gutter patch

04/02/07 12:04:51 changed by tschaub

  • keywords set to review.

por favor

04/02/07 12:49:27 changed by sderle

  • attachment gutter.3.2.patch added.

gutter.3.patch with fixed line endings

04/02/07 12:52:05 changed 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.

04/02/07 12:52:15 changed by sderle

  • keywords changed from review to commit.

04/02/07 13:19:22 changed by tschaub

  • keywords deleted.
  • status changed from new to closed.
  • resolution set to fixed.

resolved in r2979