From a80b968ed939ab5e8e42d3d3646aa1a83b97f81c Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Wed, 6 Aug 2014 16:41:27 +0200 Subject: [PATCH] fix permalink artefacts with nogo circles: patch to disable map animation --- js/plugin/Permalink.Routing.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/plugin/Permalink.Routing.js b/js/plugin/Permalink.Routing.js index ea2b713..71026d8 100644 --- a/js/plugin/Permalink.Routing.js +++ b/js/plugin/Permalink.Routing.js @@ -29,6 +29,18 @@ L.Control.Permalink.include({ } }); +// patch: no animation when setting the map view, strange effects with nogo circles +L.Control.Permalink.include({ + _set_center: function(e) + { + //console.info('Update center', e); + var params = e.params; + if (params.zoom === undefined || + params.lat === undefined || + params.lon === undefined) return; + this._map.setView(new L.LatLng(params.lat, params.lon), params.zoom, { reset: true }); + } +}); L.Control.Permalink.include({