map.getCenter().lng.toFixed(precision)));
});
+ OSM.routing = OSM.Routing(map,'OSM.routing',$('.query_wrapper.routing'));
+
$(".get_directions").on("click",function(e) {
e.preventDefault();
- $(".query_wrapper.search").hide();
- $(".query_wrapper.routing").show();
+ $(".search").hide();
+ $(".routing").show();
$(".query_wrapper.routing [name=route_from]").focus();
});
$(".close_directions").on("click",function(e) {
e.preventDefault();
- $(".query_wrapper.search").show();
- $(".query_wrapper.routing").hide();
+ $(".search").show();
+ $(".routing").hide();
+ OSM.routing.close();
$(".query_wrapper.search [name=query]").focus();
});
- OSM.routing = OSM.Routing(map,'OSM.routing',$('.query_wrapper.routing'));
-
});