Use pixel rounded center for the WebGL renderer transform

This commit is contained in:
Andreas Hocevar
2016-09-26 13:28:09 +02:00
parent 9950e97c54
commit 3026fda02b
2 changed files with 3 additions and 25 deletions

View File

@@ -254,21 +254,6 @@ ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z,
};
/**
* @param {ol.Coordinate} center Center.
* @param {number} resolution Resolution.
* @param {ol.Size} size Size.
* @protected
* @return {ol.Coordinate} Snapped center.
*/
ol.renderer.Layer.prototype.snapCenterToPixel = function(center, resolution, size) {
return [
resolution * (Math.round(center[0] / resolution) + (size[0] % 2) / 2),
resolution * (Math.round(center[1] / resolution) + (size[1] % 2) / 2)
];
};
/**
* Manage tile pyramid.
* This function performs a number of functions related to the tiles at the