Support pixelRatio during reprojection

This commit is contained in:
Petr Sloup
2015-08-12 18:48:09 +02:00
parent c2b21985f4
commit 3cc8291df4
5 changed files with 56 additions and 33 deletions

View File

@@ -208,7 +208,8 @@ ol.source.TileImage.prototype.getTile =
var tile = new ol.reproj.Tile(
sourceProjection, sourceTileGrid,
projection, targetTileGrid,
z, x, y, pixelRatio, goog.bind(function(z, x, y, pixelRatio) {
z, x, y, this.getTilePixelRatio(),
goog.bind(function(z, x, y, pixelRatio) {
return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);
}, this), this.reprojectionErrorThreshold_,
this.renderReprojectionEdges_);

View File

@@ -230,6 +230,14 @@ ol.source.Tile.prototype.getTileCacheForProjection = function(projection) {
};
/**
* @return {number}
*/
ol.source.Tile.prototype.getTilePixelRatio = function() {
return this.tilePixelRatio_;
};
/**
* @param {number} z Z.
* @param {number} pixelRatio Pixel ratio.