-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Milestone
Description
In function :
_removeTile: function (key) {
var tile = this._tiles[key];
this.fire("tileunload", {tile: tile, url: tile.src});
if (this.options.reuseTiles) {
L.DomUtil.removeClass(tile, 'leaflet-tile-loaded');
this._unusedTiles.push(tile);
} else if (tile.parentNode === this._container) {
this._container.removeChild(tile);
}
// for https://github.com/CloudMade/Leaflet/issues/137
if (!L.Browser.android) {
tile.src = L.Util.emptyImageUrl;
}
delete this._tiles[key];
},
...tile' src is assigned an emptyImageUrl. This will trigger an onLoad event from the navigator, making the _tilesToLoad become negative. _tilesToLoad must be incremented whenever tile.src is given a new value.
if (!L.Browser.android) {
if (this.src !== L.Util.emptyImageUrl) {tile.src = L.Util.emptyImageUrl; this._tilesToLoad++;}
}
Tested in Firefox 19.0.2 & Chrome 26.0.1410.43