Merge pull request #2802 from bennlich/set-url-fix

Fixed bug with TileLayer.setUrl()
This commit is contained in:
Vladimir Agafonkin 2014-07-21 12:39:21 +03:00
commit 112ac5b4b6
2 changed files with 8 additions and 4 deletions

View File

@ -191,6 +191,10 @@ L.GridLayer = L.Layer.extend({
});
}
if (this._abortLoading) {
this._abortLoading();
}
this._tiles = {};
this._tilesToLoad = 0;
this._tilesTotal = 0;

View File

@ -143,11 +143,11 @@ L.TileLayer = L.GridLayer.extend({
for (i in this._tiles) {
tile = this._tiles[i];
if (!tile.complete) {
tile.onload = L.Util.falseFn;
tile.onerror = L.Util.falseFn;
tile.src = L.Util.emptyImageUrl;
tile.onload = L.Util.falseFn;
tile.onerror = L.Util.falseFn;
if (!tile.complete) {
tile.src = L.Util.emptyImageUrl;
L.DomUtil.remove(tile);
}
}