+ $(".directions_form a.directions_close").on("click", function(e) {
+ e.preventDefault();
+ var route_from = $(e.target).parent().parent().parent().find("input[name=route_from]").val();
+ if (route_from) {
+ OSM.router.route("/?query=" + encodeURIComponent(route_from) + OSM.formatHash(map));
+ } else {
+ OSM.router.route("/" + OSM.formatHash(map));
+ }
+ });
+