From 9707648550fd40413b5c320ab90715ef70102e6b Mon Sep 17 00:00:00 2001 From: Bernhard Eder Date: Sun, 26 Oct 2014 15:40:50 +0100 Subject: [PATCH] fixed GridLayer not showing up after removing and adding the same instance --- debug/map/layer_remove_add.html | 45 +++++++++++++++++++++++++++++++++ src/layer/tile/GridLayer.js | 1 + 2 files changed, 46 insertions(+) create mode 100644 debug/map/layer_remove_add.html diff --git a/debug/map/layer_remove_add.html b/debug/map/layer_remove_add.html new file mode 100644 index 00000000..9397728f --- /dev/null +++ b/debug/map/layer_remove_add.html @@ -0,0 +1,45 @@ + + + + Leaflet debug page + + + + + + + + + + + + +
+ + + + + diff --git a/src/layer/tile/GridLayer.js b/src/layer/tile/GridLayer.js index d1ab325c..4961bff0 100644 --- a/src/layer/tile/GridLayer.js +++ b/src/layer/tile/GridLayer.js @@ -55,6 +55,7 @@ L.GridLayer = L.Layer.extend({ L.DomUtil.remove(this._container); map._removeZoomLimit(this); this._container = null; + this._tileZoom = null; }, bringToFront: function () {