Skip to content

Commit

Permalink
use LayerGroup.hasLayer, drop <= v0.5.1 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nrenner committed Dec 6, 2013
1 parent 9f5b07c commit 3fe551c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions TileLayer.GeoJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,8 @@ L.TileLayer.Vector = L.TileLayer.Ajax.extend({
this.fire('tileabort', {tile: tile});
this._tileLoaded();
}
if (tileLayer) {
// L.LayerGroup.hasLayer > v0.5.1 only
if (this.vectorLayer._layers[L.stamp(tileLayer)]) {
this.vectorLayer.removeLayer(tileLayer);
}
if (tileLayer && this.vectorLayer.hasLayer(tileLayer)) {
this.vectorLayer.removeLayer(tileLayer);
}

if (tile.parsed) {
Expand Down

0 comments on commit 3fe551c

Please sign in to comment.