Ticket #2324 (closed feature: fixed)
Support for Layers with cropped edge tiles (with different dimension than the regular grid)
|Reported by:||klokan||Owned by:||ahocevar|
OpenLayers is now resizing all the tiles into the same tileSize. There are several sources of imagery (like Zoomify tiles or image servers as IIPImage) which provide the images in the way that the tiles on the right and on the bottom are cropped. OpenLayers is now not able to display such edge tiles with their original dimensions - they are all stretched to the same universal tileSize of the grid.
This patch is non-intrusively modifying Tile/Image.js to support the non-regular size of the edge tiles in custom Layers. A layer can redefine getImageSize() function which normally just return the self.tileSize for grid-based layers (look into OpenLayers/Layer.js). We are adding support for the optional "bounds" parameter into the layer.getImageSize() function. Thanks to this parameter the layer can calculate different size of tiles based on the requested position in the grid. Till now getImageSize() was always called without parameters (in Layers like WMS, MapServer and ArcGIS93Rest), so there should not be any regression. The backBuffer tiles are correctly resized as well with this patch - to support the OpenLayers resizing effect.
Example of a layer with the edge tiles is in the Zoomify patch in #1285.
This ticket is replacing #1496 which had regression on the WMS gutter functionality and was trying to do more or less the same.