support pixel resolution for tile bbox on mercator

This commit is contained in:
javi 2014-09-24 11:47:12 +02:00
parent 1ca2930397
commit bf514fbc47

View File

@ -59,9 +59,10 @@ MercatorProjection.prototype._tilePixelPos = function(tileX, tileY) {
};
};
MercatorProjection.prototype.tilePixelBBox = function(x, y, zoom, px, py) {
MercatorProjection.prototype.tilePixelBBox = function(x, y, zoom, px, py, res) {
res = res || 1.0;
var numTiles = 1 <<zoom;
var inc = 1.0/numTiles;
var inc = res/numTiles;
px = (x*this._tileSize + px)/numTiles;
py = (y*this._tileSize + py)/numTiles;
return [