Merge pull request #236 from giscloud/master

fixed sending invalid tile requests when using option noWrap
This commit is contained in:
Vladimir Agafonkin 2011-08-10 00:36:29 -07:00
commit 4261b87d1c

View File

@ -191,7 +191,11 @@ L.TileLayer = L.Class.extend({
// wrap tile coordinates
if (!this.options.noWrap) {
tilePoint.x = ((tilePoint.x % tileLimit) + tileLimit) % tileLimit;
} else if (tilePoint.x < 0 || tilePoint.x >= tileLimit) {
this._tilesToLoad--;
return;
}
if (tilePoint.y < 0 || tilePoint.y >= tileLimit) {
this._tilesToLoad--;
return;