Merge pull request #6002 from ahocevar/gutter-pixel-ratio

Use tile pixel ratio for gutter calculation
This commit is contained in:
Andreas Hocevar
2016-10-20 13:56:43 +02:00
committed by GitHub
4 changed files with 2 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ ol.renderer.canvas.TileLayer.prototype.renderTileImages = function(context, fram
var pixelScale = pixelRatio / resolution;
var layer = this.getLayer();
var source = /** @type {ol.source.Tile} */ (layer.getSource());
var tileGutter = pixelRatio * source.getGutter(projection);
var tileGutter = source.getTilePixelRatio(pixelRatio) * source.getGutter(projection);
var tileGrid = source.getTileGridForProjection(projection);
var hasRenderListeners = layer.hasListener(ol.render.Event.Type.RENDER);

View File

@@ -161,7 +161,7 @@ ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerS
var pixelRatio = tilePixelSize[0] /
ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize_)[0];
var tilePixelResolution = tileResolution / pixelRatio;
var tileGutter = frameState.pixelRatio * tileSource.getGutter(projection);
var tileGutter = tileSource.getTilePixelRatio(pixelRatio) * tileSource.getGutter(projection);
var center = viewState.center;
var extent = frameState.extent;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 21 KiB