From bcc4897ef6ba4eb54abd7f3502e98cdf8c37f762 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 8 Oct 2013 15:54:07 -0700 Subject: [PATCH] Restore previous map state on popstate --- app/assets/javascripts/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 59335ff84..11523df39 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -24,6 +24,10 @@ $(document).ready(function () { map.hash = L.hash(map); + $(window).on('popstate', function() { + map.hash.update(); + }); + var copyright = I18n.t('javascripts.map.copyright', {copyright_url: '/copyright'}); var layers = [ -- 2.43.2