From: John Firebaugh Date: Tue, 8 Oct 2013 22:54:07 +0000 (-0700) Subject: Restore previous map state on popstate X-Git-Tag: live~4656^2~213 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/bcc4897ef6ba4eb54abd7f3502e98cdf8c37f762 Restore previous map state on popstate --- 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 = [