X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6db326aa1f084a062a3b658876bc01bf650f5702..9f7ec064e448a745e0ea2615a089f0988215dec6:/app/assets/javascripts/index/search.js?ds=sidebyside diff --git a/app/assets/javascripts/index/search.js b/app/assets/javascripts/index/search.js index fa9546f4e..ba66f4782 100644 --- a/app/assets/javascripts/index/search.js +++ b/app/assets/javascripts/index/search.js @@ -1,6 +1,9 @@ //= require jquery.simulate +//= require querystring OSM.Search = function (map) { + var querystring = require("querystring-component"); + $(".search_form input[name=query]").on("input", function (e) { if ($(e.target).val() === "") { $(".describe_location").fadeIn(100); @@ -33,7 +36,7 @@ OSM.Search = function (map) { $(".describe_location").on("click", function (e) { e.preventDefault(); var center = map.getCenter().wrap(), - precision = OSM.zoomPrecision(map.getZoom()); + precision = OSM.zoomPrecision(map.getZoom()); OSM.router.route("/search?whereami=1&query=" + encodeURIComponent( center.lat.toFixed(precision) + "," + center.lng.toFixed(precision) ));