Merge pull request #6002 from ahocevar/gutter-pixel-ratio
Use tile pixel ratio for gutter calculation
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 |
Reference in New Issue
Block a user