fixed canvas_layer to track map resize

This commit is contained in:
javi 2013-11-09 12:10:07 +01:00
parent 21b2c444e3
commit 3a20b248f2

View File

@ -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);
},