X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1f7bd08f4a8a6a626a0c1d7ed60f2dcd6a6801e8..9995d316b23eaf3145da524de0b30313769a73ac:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index b89d6c71d..66dfa5b6f 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -6,6 +6,7 @@ //= require leaflet.note //= require leaflet.share //= require leaflet.polyline +//= require leaflet.query //= require index/search //= require index/browse //= require index/export @@ -15,6 +16,7 @@ //= require index/new_note //= require index/directions //= require index/changeset +//= require index/query //= require router $(document).ready(function () { @@ -126,6 +128,11 @@ $(document).ready(function () { sidebar: sidebar }).addTo(map); + L.OSM.query({ + position: position, + sidebar: sidebar + }).addTo(map); + L.control.scale() .addTo(map); @@ -157,15 +164,6 @@ $(document).ready(function () { $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" }); }); - if ($.cookie('_osm_sotm') == 'hide') { - $('#sotm').hide(); - } - - $('#sotm .close').on('click', function() { - $('#sotm').hide(); - $.cookie("_osm_sotm", 'hide', { expires: expiry }); - }); - if ($.cookie('_osm_welcome') == 'hide') { $('.welcome').hide(); } @@ -294,7 +292,8 @@ $(document).ready(function () { "/node/:id(/history)": OSM.Browse(map, 'node'), "/way/:id(/history)": OSM.Browse(map, 'way'), "/relation/:id(/history)": OSM.Browse(map, 'relation'), - "/changeset/:id": OSM.Changeset(map) + "/changeset/:id": OSM.Changeset(map), + "/query": OSM.Query(map) }); if (OSM.preferred_editor == "remote" && document.location.pathname == "/edit") {