X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/22408c3e5bbce14b70b56be3a02122e2db3de896..b92cb5b7729287d0256bbe915bfb99ef27d7b940:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 6fc870a4c..f1644c06f 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -203,6 +203,11 @@ $(document).ready(function () { map.invalidateSize({pan: false}) .panBy([-300, 0], {animate: false}); OSM.loadSidebarContent(path); + page.load(); + }; + + page.load = function() { + return map.getState(); }; page.popstate = function(path) { @@ -256,6 +261,8 @@ $(document).ready(function () { "/browse/:type/:id(/history)": OSM.Browse(map) }); + OSM.route.load(); + $(document).on("click", "a", function(e) { if (e.isDefaultPrevented() || e.isPropagationStopped()) return; if (this.host === window.location.host && OSM.route(this.pathname + this.search + this.hash)) e.preventDefault();