Merge pull request #4156 from Leaflet/tile-bounds
Partial revert of e2fbe196
, fixes #4145
This commit is contained in:
commit
172668895a
@ -444,8 +444,9 @@ L.GridLayer = L.Layer.extend({
|
||||
|
||||
_getTiledPixelBounds: function (center) {
|
||||
var map = this._map,
|
||||
scale = map.getZoomScale(map.getZoom(), this._tileZoom),
|
||||
pixelCenter = map.project(center, this._tileZoom).floor(),
|
||||
halfSize = map.getSize().divideBy(2);
|
||||
halfSize = map.getSize().divideBy(scale * 2);
|
||||
|
||||
return new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user