From 3b7494b9d927460f9f5198deb5acc915d64cb5c1 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 24 Apr 2017 11:42:36 +0200 Subject: [PATCH] Fix route drawing on page reload --- js/plugin/leaflet-fullHash.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/plugin/leaflet-fullHash.js b/js/plugin/leaflet-fullHash.js index 9a68404..725aed9 100644 --- a/js/plugin/leaflet-fullHash.js +++ b/js/plugin/leaflet-fullHash.js @@ -138,11 +138,13 @@ var options = this.options, layer = parsed.layer in options ? parsed.layer : Object.keys(options)[0], that = this; + + //FIXME: removing/readding layers breaks Routing plugin //Add/remove layer - this.map.eachLayer(function(layer) { - that.map.removeLayer(layer); - }); - that.map.addLayer(options[layer]); + // this.map.eachLayer(function(layer) { + // that.map.removeLayer(layer); + // }); + // that.map.addLayer(options[layer]); this.isUpdatingHash = false; } else {