]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Start to make turn-by-turn instructions clickable
[rails.git] / app / assets / javascripts / index.js
index 638be0dcab18ca614b3bcdab455c07eafb65dea1..a3531eb3060c710eeeb9b36fc40c2dc3cc7e1901 100644 (file)
@@ -347,6 +347,8 @@ $(document).ready(function () {
       map.getCenter().lng.toFixed(precision)));
   });
 
+  OSM.routing = OSM.Routing(map,'OSM.routing',$('.query_wrapper.routing'));
+
   $(".get_directions").on("click",function(e) {
        e.preventDefault();
        $(".search").hide();
@@ -358,9 +360,8 @@ $(document).ready(function () {
        e.preventDefault();
        $(".search").show();
        $(".routing").hide();
+       OSM.routing.close();
        $(".query_wrapper.search [name=query]").focus();
   });
 
-  OSM.routing = OSM.Routing(map,'OSM.routing',$('.query_wrapper.routing'));
-
 });