Skip to content

Commit

Permalink
Merge pull request openstreetmap#17 from danstowell/jsrouting-clearse…
Browse files Browse the repository at this point in the history
…arch

jsrouting: clear search boxes on page unload
  • Loading branch information
systemed committed Mar 9, 2014
2 parents 42c1dec + bc67479 commit 373b932
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ OSM.Router = function(map, rts) {

map.on('moveend baselayerchange overlaylayerchange', router.updateHash);
$(window).on('hashchange', router.hashUpdated);
$(window).on('unload', function(e) {
$(".query_wrapper.routing input").val("");
});

return router;
};

0 comments on commit 373b932

Please sign in to comment.