X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/07082c35e6e2b72e774b938f557a44ec0d11a076..9b35270d0be2984a4100e412518255aeb50068bf:/app/assets/javascripts/router.js diff --git a/app/assets/javascripts/router.js b/app/assets/javascripts/router.js index 9657549b1..ab2064107 100644 --- a/app/assets/javascripts/router.js +++ b/app/assets/javascripts/router.js @@ -114,7 +114,9 @@ OSM.Router = function(map, rts) { route = routes.recognize(path); if (!route) return false; currentRoute.run('unload'); - window.history.pushState(OSM.parseHash(url), document.title, url); + var state = OSM.parseHash(url); + map.setState(state); + window.history.pushState(state, document.title, url); currentPath = path; currentRoute = route; currentRoute.run('pushstate', currentPath);