Don't load class leaflet-tile-loaded in case of error (#4980)
This commit is contained in:
parent
c624a3ed50
commit
6b0808d6f0
@ -811,14 +811,16 @@ L.GridLayer = L.Layer.extend({
|
||||
this._pruneTiles();
|
||||
}
|
||||
|
||||
L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
|
||||
if (!err) {
|
||||
L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
|
||||
|
||||
// @event tileload: TileEvent
|
||||
// Fired when a tile loads.
|
||||
this.fire('tileload', {
|
||||
tile: tile.el,
|
||||
coords: coords
|
||||
});
|
||||
// @event tileload: TileEvent
|
||||
// Fired when a tile loads.
|
||||
this.fire('tileload', {
|
||||
tile: tile.el,
|
||||
coords: coords
|
||||
});
|
||||
}
|
||||
|
||||
if (this._noTilesToLoad()) {
|
||||
this._loading = false;
|
||||
|
Loading…
Reference in New Issue
Block a user