diff --git a/lib/torque/gmaps/gmaps_tileloader_mixin.js b/lib/torque/gmaps/gmaps_tileloader_mixin.js index a0c6a6c..ef128aa 100644 --- a/lib/torque/gmaps/gmaps_tileloader_mixin.js +++ b/lib/torque/gmaps/gmaps_tileloader_mixin.js @@ -21,6 +21,7 @@ GMapsTileLoader.prototype = { }, _removeTileLoader: function() { + this.fire('remove'); for(var i in this._listeners) { google.maps.event.removeListener(this._listeners[i]); } diff --git a/lib/torque/leaflet/leaflet_tileloader_mixin.js b/lib/torque/leaflet/leaflet_tileloader_mixin.js index 1e72a48..b462ee3 100644 --- a/lib/torque/leaflet/leaflet_tileloader_mixin.js +++ b/lib/torque/leaflet/leaflet_tileloader_mixin.js @@ -11,6 +11,7 @@ L.Mixin.TileLoader = { }, _removeTileLoader: function() { + this.fire('remove'); this._map.off({ 'moveend': this._updateTiles }, this);