return true;
};
+ router.replace = function (url) {
+ window.history.replaceState(OSM.parseHash(url), document.title, url);
+ };
+
router.stateChange = function(state) {
if (state.center) {
window.history.replaceState(state, document.title, OSM.formatHash(state));
}
};
} else {
- router.route = function (url) {
+ router.route = router.replace = function (url) {
window.location.assign(url);
};
map.on('moveend baselayerchange overlaylayerchange', router.updateHash);
$(window).on('hashchange', router.hashUpdated);
- $(window).on('unload', function(e) {
- $(".query_wrapper.routing input").val("");
- });
return router;
};