diff --git a/lib/torque/leaflet/canvas_layer.js b/lib/torque/leaflet/canvas_layer.js index e7ddcd9..56a1be2 100644 --- a/lib/torque/leaflet/canvas_layer.js +++ b/lib/torque/leaflet/canvas_layer.js @@ -45,6 +45,7 @@ L.CanvasLayer = L.Class.extend({ }, this); map.on('move', this._render, this);//function(){ console.log("a"); }, this); + map.on('resize', this._reset, this); if(this.options.tileLoader) { this._initTileLoader(); @@ -65,7 +66,8 @@ L.CanvasLayer = L.Class.extend({ map._container.removeChild(this._staticPane); map.off({ 'viewreset': this._reset, - 'move': this._render + 'move': this._render, + 'resize': this._reset }, this); },