Use CRS's bounds to calculate wrap

This commit is contained in:
perliedman 2013-09-23 09:59:10 +02:00
parent b782498650
commit 3bcc1c9a3a

View File

@ -473,8 +473,9 @@ L.TileLayer = L.Class.extend({
},
_getWrapTileNum: function () {
// TODO refactor, limit is not valid for non-standard projections
return Math.pow(2, this._getZoomForUrl());
var crs = this._map.options.crs,
bounds = crs.getBounds(this._getZoomForUrl());
return bounds[3] / this.options.tileSize;
},
_adjustTilePoint: function (tilePoint) {