more flexible tile remove method
This commit is contained in:
parent
683cc4534c
commit
9b752757ef
@ -390,13 +390,22 @@ L.GridLayer = L.Layer.extend({
|
||||
}
|
||||
},
|
||||
|
||||
_removeTile: function (key, zoom) {
|
||||
var tiles = this._levels[zoom].tiles,
|
||||
tile = tiles[key];
|
||||
_removeTile: function (key) {
|
||||
var coords = this._keyToTileCoords(key),
|
||||
level = this._levels[coords.z],
|
||||
tiles = level && level.tiles,
|
||||
tile = tiles && tiles[key];
|
||||
|
||||
if (tile) {
|
||||
L.DomUtil.remove(tile);
|
||||
|
||||
delete tiles[key];
|
||||
this.fire('tileunload', {tile: tile});
|
||||
|
||||
this.fire('tileunload', {
|
||||
tile: tile,
|
||||
coords: coords
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_initTile: function (tile) {
|
||||
|
Loading…
Reference in New Issue
Block a user