support pixel resolution for tile bbox on mercator
This commit is contained in:
parent
1ca2930397
commit
bf514fbc47
@ -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 numTiles = 1 <<zoom;
|
||||||
var inc = 1.0/numTiles;
|
var inc = res/numTiles;
|
||||||
px = (x*this._tileSize + px)/numTiles;
|
px = (x*this._tileSize + px)/numTiles;
|
||||||
py = (y*this._tileSize + py)/numTiles;
|
py = (y*this._tileSize + py)/numTiles;
|
||||||
return [
|
return [
|
||||||
|
Loading…
Reference in New Issue
Block a user