fixed not decreasing total tile count when a tile is being discarded

This commit is contained in:
Dino Ravnić 2011-08-09 21:55:43 +01:00
parent d6f34b5c9b
commit 9532db6d08

View File

@ -192,7 +192,10 @@ L.TileLayer = L.Class.extend({
if (!this.options.noWrap) {
tilePoint.x = ((tilePoint.x % tileLimit) + tileLimit) % tileLimit;
}
if (tilePoint.y < 0 || tilePoint.y >= tileLimit) { return; }
if (tilePoint.y < 0 || tilePoint.y >= tileLimit) {
this._tilesToLoad--;
return;
}
// create tile
var tile = this._createTile();