]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Remove duplicate search handlers
[rails.git] / app / assets / javascripts / index.js
index 9a05b62c26ac2ca097e3e760d122b7ff97068ac1..9e386d54bf2bccef0b56c1e331d3fef0494c35dc 100644 (file)
@@ -355,24 +355,4 @@ $(document).ready(function () {
     if (OSM.router.route(this.pathname + this.search + this.hash))
       e.preventDefault();
   });
-
-  $(".search_form").on("submit", function(e) {
-    e.preventDefault();
-    $("header").addClass("closed");
-    var query = $(this).find("input[name=query]").val();
-    if (query) {
-      OSM.router.route("/search?query=" + encodeURIComponent(query) + OSM.formatHash(map));
-    } else {
-      OSM.router.route("/");
-    }
-  });
-
-  $(".describe_location").on("click", function(e) {
-    e.preventDefault();
-    var center = map.getCenter().wrap(),
-      precision = OSM.zoomPrecision(map.getZoom());
-    OSM.router.route("/search?query=" + encodeURIComponent(
-      center.lat.toFixed(precision) + "," + center.lng.toFixed(precision)
-    ));
-  });
 });