From f197fb31becdde966a8274801260bd00395cba0f Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Wed, 3 Jun 2020 20:24:17 +0200 Subject: [PATCH] Exclude loaded tracks from URL hash --- js/plugin/leaflet-fullHash.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/plugin/leaflet-fullHash.js b/js/plugin/leaflet-fullHash.js index ba7fb50..7c77f40 100644 --- a/js/plugin/leaflet-fullHash.js +++ b/js/plugin/leaflet-fullHash.js @@ -144,6 +144,10 @@ formatLayers: function() { var objList = this.options.layersControl.getActiveLayers(); + // exclude vector layers (loaded tracks), but not when id set (route quality coding) + objList = objList.filter(function(obj) { + return obj.layer instanceof L.GridLayer || obj.layer.id; + }); var layerList = objList.map( L.bind(function(obj) { return encodeURIComponent(this.options.layersControl.toLayerString(obj));